merges tip, conflict resolved
This commit is contained in:
commit
b5c0cada0d
|
@ -258,7 +258,7 @@ GLuint EDA_3D_CANVAS::CreateDrawGL_List()
|
||||||
if( curr_zone->m_FillMode == 0 )
|
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 )
|
if( curr_zone->GetFilledPolysList().size() > 3 )
|
||||||
{
|
{
|
||||||
Draw3D_SolidPolygonsInZones( curr_zone );
|
Draw3D_SolidPolygonsInZones( curr_zone );
|
||||||
}
|
}
|
||||||
|
@ -286,14 +286,16 @@ GLuint EDA_3D_CANVAS::CreateDrawGL_List()
|
||||||
{
|
{
|
||||||
ZONE_CONTAINER* zone = pcb->GetArea( ii );
|
ZONE_CONTAINER* zone = pcb->GetArea( ii );
|
||||||
|
|
||||||
if( zone->m_FilledPolysList.size() == 0 )
|
std::vector<CPolyPt> polysList = zone->GetFilledPolysList();
|
||||||
|
|
||||||
|
if( polysList.size() == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( zone->m_ZoneMinThickness <= 1 )
|
if( zone->m_ZoneMinThickness <= 1 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int imax = zone->m_FilledPolysList.size() - 1;
|
int imax = polysList.size() - 1;
|
||||||
CPolyPt* firstcorner = &zone->m_FilledPolysList[0];
|
CPolyPt* firstcorner = &polysList[0];
|
||||||
CPolyPt* begincorner = firstcorner;
|
CPolyPt* begincorner = firstcorner;
|
||||||
SEGZONE dummysegment( pcb );
|
SEGZONE dummysegment( pcb );
|
||||||
dummysegment.SetLayer( zone->GetLayer() );
|
dummysegment.SetLayer( zone->GetLayer() );
|
||||||
|
@ -301,7 +303,7 @@ GLuint EDA_3D_CANVAS::CreateDrawGL_List()
|
||||||
|
|
||||||
for( int ic = 1; ic <= imax; ic++ )
|
for( int ic = 1; ic <= imax; ic++ )
|
||||||
{
|
{
|
||||||
CPolyPt* endcorner = &zone->m_FilledPolysList[ic];
|
CPolyPt* endcorner = &polysList[ic];
|
||||||
|
|
||||||
if( begincorner->utility == 0 )
|
if( begincorner->utility == 0 )
|
||||||
{
|
{
|
||||||
|
@ -330,7 +332,7 @@ GLuint EDA_3D_CANVAS::CreateDrawGL_List()
|
||||||
ic++;
|
ic++;
|
||||||
|
|
||||||
if( ic < imax - 1 )
|
if( ic < imax - 1 )
|
||||||
begincorner = firstcorner = &zone->m_FilledPolysList[ic];
|
begincorner = firstcorner = &polysList[ic];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -440,7 +442,8 @@ void EDA_3D_CANVAS::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* aZone )
|
||||||
// Draw solid areas contained in this zone
|
// Draw solid areas contained in this zone
|
||||||
int StartContour = 1;
|
int StartContour = 1;
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < aZone->m_FilledPolysList.size(); ii++ )
|
std::vector<CPolyPt> polysList = aZone->GetFilledPolysList();
|
||||||
|
for( unsigned ii = 0; ii < polysList.size(); ii++ )
|
||||||
{
|
{
|
||||||
if( StartContour == 1 )
|
if( StartContour == 1 )
|
||||||
{
|
{
|
||||||
|
@ -449,11 +452,11 @@ void EDA_3D_CANVAS::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* aZone )
|
||||||
StartContour = 0;
|
StartContour = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
v_data[0] = aZone->m_FilledPolysList[ii].x * g_Parm_3D_Visu.m_BoardScale;
|
v_data[0] = polysList[ii].x * g_Parm_3D_Visu.m_BoardScale;
|
||||||
v_data[1] = -aZone->m_FilledPolysList[ii].y * g_Parm_3D_Visu.m_BoardScale;
|
v_data[1] = -polysList[ii].y * g_Parm_3D_Visu.m_BoardScale;
|
||||||
gluTessVertex( tess, v_data, &aZone->m_FilledPolysList[ii] );
|
gluTessVertex( tess, v_data, &polysList[ii] );
|
||||||
|
|
||||||
if( aZone->m_FilledPolysList[ii].end_contour == 1 )
|
if( polysList[ii].end_contour == 1 )
|
||||||
{
|
{
|
||||||
gluTessEndContour( tess );
|
gluTessEndContour( tess );
|
||||||
gluTessEndPolygon( tess );
|
gluTessEndPolygon( tess );
|
||||||
|
|
|
@ -42,6 +42,14 @@ Dialogs:
|
||||||
leaving them all bundled tightly together. The dialog box should look
|
leaving them all bundled tightly together. The dialog box should look
|
||||||
nice at any size large enough to show all the components.
|
nice at any size large enough to show all the components.
|
||||||
|
|
||||||
|
When using wxFormBuilder, please add the following settings to the
|
||||||
|
"Dialog" node:
|
||||||
|
subclass.name <- DIALOG_SHIM
|
||||||
|
subclass.header <- dialog_shim.h
|
||||||
|
|
||||||
|
This will provide for an override of the Show( bool ) wxWindow() function
|
||||||
|
and provide retentitive size and position for the session.
|
||||||
|
|
||||||
Use tooltips to explain the functionality of each non-obvious control.
|
Use tooltips to explain the functionality of each non-obvious control.
|
||||||
This is important because the help files and the wiki often lag behind
|
This is important because the help files and the wiki often lag behind
|
||||||
the source code.
|
the source code.
|
||||||
|
|
|
@ -55,6 +55,7 @@ const wxString SchematicFileWildcard( _( "KiCad schematic files (*.sch)|*.sch" )
|
||||||
const wxString NetlistFileWildcard( _( "KiCad netlist files (*.net)|*.net" ) );
|
const wxString NetlistFileWildcard( _( "KiCad netlist files (*.net)|*.net" ) );
|
||||||
const wxString GerberFileWildcard( _( "Gerber files (*.pho)|*.pho" ) );
|
const wxString GerberFileWildcard( _( "Gerber files (*.pho)|*.pho" ) );
|
||||||
const wxString LegacyPcbFileWildcard( _( "KiCad printed circuit board files (*.brd)|*.brd" ) );
|
const wxString LegacyPcbFileWildcard( _( "KiCad printed circuit board files (*.brd)|*.brd" ) );
|
||||||
|
const wxString EaglePcbFileWildcard( _( "Eagle ver. 6.x XML PCB files (*.brd)|*.brd" ) );
|
||||||
const wxString PcbFileWildcard( _( "KiCad s-expr printed circuit board files (*.kicad_pcb)|*.kicad_pcb" ) );
|
const wxString PcbFileWildcard( _( "KiCad s-expr printed circuit board files (*.kicad_pcb)|*.kicad_pcb" ) );
|
||||||
const wxString FootprintLibFileWildcard( _( "KiCad footprint library file (*.mod)|*.mod" ) );
|
const wxString FootprintLibFileWildcard( _( "KiCad footprint library file (*.mod)|*.mod" ) );
|
||||||
const wxString PdfFileWildcard( _( "Portable document format files (*.pdf)|*.pdf" ) );
|
const wxString PdfFileWildcard( _( "Portable document format files (*.pdf)|*.pdf" ) );
|
||||||
|
|
|
@ -34,6 +34,14 @@ public:
|
||||||
void OnUpdateTextDrawMode( wxUpdateUIEvent& aEvent );
|
void OnUpdateTextDrawMode( wxUpdateUIEvent& aEvent );
|
||||||
void OnUpdateLineDrawMode( wxUpdateUIEvent& aEvent );
|
void OnUpdateLineDrawMode( wxUpdateUIEvent& aEvent );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function InitDisplay
|
||||||
|
* Refresh the full display for this frame:
|
||||||
|
* Set the title, the status line and redraw the canvas
|
||||||
|
* Must be called after the footprint to display is modifed
|
||||||
|
*/
|
||||||
|
void InitDisplay();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function IsGridVisible() , virtual
|
* Function IsGridVisible() , virtual
|
||||||
* @return true if the grid must be shown
|
* @return true if the grid must be shown
|
||||||
|
|
|
@ -30,82 +30,78 @@
|
||||||
*/
|
*/
|
||||||
void CVPCB_MAINFRAME::CreateScreenCmp()
|
void CVPCB_MAINFRAME::CreateScreenCmp()
|
||||||
{
|
{
|
||||||
wxString msg, FootprintName;
|
|
||||||
bool IsNew = false;
|
|
||||||
|
|
||||||
FootprintName = m_FootprintList->GetSelectedFootprint();
|
|
||||||
|
|
||||||
if( m_DisplayFootprintFrame == NULL )
|
if( m_DisplayFootprintFrame == NULL )
|
||||||
{
|
{
|
||||||
m_DisplayFootprintFrame = new DISPLAY_FOOTPRINTS_FRAME( this, _( "Module" ),
|
m_DisplayFootprintFrame = new DISPLAY_FOOTPRINTS_FRAME( this, _( "Module" ),
|
||||||
wxPoint( 0, 0 ),
|
wxPoint( 0, 0 ),
|
||||||
wxSize( 600, 400 ),
|
wxSize( 600, 400 ),
|
||||||
KICAD_DEFAULT_DRAWFRAME_STYLE );
|
KICAD_DEFAULT_DRAWFRAME_STYLE );
|
||||||
IsNew = true;
|
|
||||||
m_DisplayFootprintFrame->Show( true );
|
m_DisplayFootprintFrame->Show( true );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Raising the window does not show the window on Windows if iconized.
|
|
||||||
// This should work on any platform.
|
|
||||||
if( m_DisplayFootprintFrame->IsIconized() )
|
if( m_DisplayFootprintFrame->IsIconized() )
|
||||||
m_DisplayFootprintFrame->Iconize( false );
|
m_DisplayFootprintFrame->Iconize( false );
|
||||||
m_DisplayFootprintFrame->Raise();
|
|
||||||
|
|
||||||
// Raising the window does not set the focus on Linux. This should work on any platform.
|
|
||||||
if( wxWindow::FindFocus() != m_DisplayFootprintFrame )
|
|
||||||
m_DisplayFootprintFrame->SetFocus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !FootprintName.IsEmpty() )
|
m_DisplayFootprintFrame->InitDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Refresh the full display for this frame:
|
||||||
|
* Set the title, the status line and redraw the canvas
|
||||||
|
* Must be called after the footprint to display is modifed
|
||||||
|
*/
|
||||||
|
void DISPLAY_FOOTPRINTS_FRAME::InitDisplay()
|
||||||
|
{
|
||||||
|
wxString msg;
|
||||||
|
CVPCB_MAINFRAME * parentframe = (CVPCB_MAINFRAME *) GetParent();
|
||||||
|
wxString footprintName = parentframe->m_FootprintList->GetSelectedFootprint();
|
||||||
|
|
||||||
|
if( !footprintName.IsEmpty() )
|
||||||
{
|
{
|
||||||
msg = _( "Footprint: " ) + FootprintName;
|
msg = _( "Footprint: " ) + footprintName;
|
||||||
m_DisplayFootprintFrame->SetTitle( msg );
|
SetTitle( msg );
|
||||||
FOOTPRINT_INFO* Module = m_footprints.GetModuleInfo( FootprintName );
|
FOOTPRINT_INFO* module_info = parentframe->m_footprints.GetModuleInfo( footprintName );
|
||||||
msg = _( "Lib: " );
|
msg = _( "Lib: " );
|
||||||
|
|
||||||
if( Module )
|
if( module_info )
|
||||||
msg += Module->m_LibName;
|
msg += module_info->m_LibName;
|
||||||
else
|
else
|
||||||
msg += wxT( "???" );
|
msg += wxT( "???" );
|
||||||
|
|
||||||
m_DisplayFootprintFrame->SetStatusText( msg, 0 );
|
SetStatusText( msg, 0 );
|
||||||
|
|
||||||
if( m_DisplayFootprintFrame->GetBoard()->m_Modules.GetCount() )
|
if( GetBoard()->m_Modules.GetCount() )
|
||||||
{
|
{
|
||||||
// there is only one module in the list
|
// there is only one module in the list
|
||||||
m_DisplayFootprintFrame->GetBoard()->m_Modules.DeleteAll();
|
GetBoard()->m_Modules.DeleteAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
MODULE* mod = m_DisplayFootprintFrame->Get_Module( FootprintName );
|
MODULE* module = Get_Module( footprintName );
|
||||||
|
|
||||||
if( mod )
|
if( module )
|
||||||
m_DisplayFootprintFrame->GetBoard()->m_Modules.PushBack( mod );
|
GetBoard()->m_Modules.PushBack( module );
|
||||||
|
|
||||||
m_DisplayFootprintFrame->Zoom_Automatique( false );
|
Zoom_Automatique( false );
|
||||||
m_DisplayFootprintFrame->GetCanvas()->Refresh();
|
|
||||||
|
|
||||||
// Display new cursor coordinates and zoom value:
|
|
||||||
m_DisplayFootprintFrame->UpdateStatusBar();
|
|
||||||
|
|
||||||
if( m_DisplayFootprintFrame->m_Draw3DFrame )
|
|
||||||
m_DisplayFootprintFrame->m_Draw3DFrame->NewDisplay();
|
|
||||||
}
|
}
|
||||||
else if( !IsNew ) // No footprint to display. Erase old footprint, if any
|
else // No footprint to display. Erase old footprint, if any
|
||||||
{
|
{
|
||||||
if( m_DisplayFootprintFrame->GetBoard()->m_Modules.GetCount() )
|
if( GetBoard()->m_Modules.GetCount() )
|
||||||
{
|
{
|
||||||
m_DisplayFootprintFrame->GetBoard()->m_Modules.DeleteAll();
|
GetBoard()->m_Modules.DeleteAll();
|
||||||
m_DisplayFootprintFrame->Zoom_Automatique( false );
|
Zoom_Automatique( false );
|
||||||
m_DisplayFootprintFrame->SetStatusText( wxEmptyString, 0 );
|
SetStatusText( wxEmptyString, 0 );
|
||||||
m_DisplayFootprintFrame->UpdateStatusBar();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_DisplayFootprintFrame->Refresh();
|
|
||||||
|
|
||||||
if( m_DisplayFootprintFrame->m_Draw3DFrame )
|
|
||||||
m_DisplayFootprintFrame->m_Draw3DFrame->NewDisplay();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Display new cursor coordinates and zoom value:
|
||||||
|
UpdateStatusBar();
|
||||||
|
|
||||||
|
GetCanvas()->Refresh();
|
||||||
|
|
||||||
|
if( m_Draw3DFrame )
|
||||||
|
m_Draw3DFrame->NewDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -321,7 +321,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::deleteFieldButtonHandler( wxCommandEven
|
||||||
if( fieldNdx >= m_FieldsBuf.size() ) // traps the -1 case too
|
if( fieldNdx >= m_FieldsBuf.size() ) // traps the -1 case too
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( fieldNdx <= VALUE )
|
if( fieldNdx < MANDATORY_FIELDS )
|
||||||
{
|
{
|
||||||
wxBell();
|
wxBell();
|
||||||
return;
|
return;
|
||||||
|
@ -360,7 +360,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB:: moveUpButtonHandler( wxCommandEvent& e
|
||||||
if( fieldNdx >= m_FieldsBuf.size() ) // traps the -1 case too
|
if( fieldNdx >= m_FieldsBuf.size() ) // traps the -1 case too
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( fieldNdx <= MANDATORY_FIELDS )
|
if( fieldNdx < MANDATORY_FIELDS )
|
||||||
{
|
{
|
||||||
wxBell();
|
wxBell();
|
||||||
return;
|
return;
|
||||||
|
@ -651,10 +651,10 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel()
|
||||||
|
|
||||||
// only user defined fields may be moved, and not the top most user defined
|
// only user defined fields may be moved, and not the top most user defined
|
||||||
// field since it would be moving up into the fixed fields, > not >=
|
// field since it would be moving up into the fixed fields, > not >=
|
||||||
moveUpButton->Enable( fieldNdx > MANDATORY_FIELDS );
|
moveUpButton->Enable( fieldNdx >= MANDATORY_FIELDS );
|
||||||
|
|
||||||
// if fieldNdx == REFERENCE, VALUE, then disable delete button
|
// if fieldNdx == REFERENCE, VALUE, then disable delete button
|
||||||
deleteFieldButton->Enable( fieldNdx > VALUE );
|
deleteFieldButton->Enable( fieldNdx >= MANDATORY_FIELDS );
|
||||||
|
|
||||||
fieldValueTextCtrl->SetValue( field.m_Text );
|
fieldValueTextCtrl->SetValue( field.m_Text );
|
||||||
|
|
||||||
|
|
|
@ -35,14 +35,13 @@
|
||||||
#include <wxEeschemaStruct.h>
|
#include <wxEeschemaStruct.h>
|
||||||
|
|
||||||
#include <general.h>
|
#include <general.h>
|
||||||
#include <protos.h>
|
|
||||||
#include <class_library.h>
|
#include <class_library.h>
|
||||||
#include <sch_component.h>
|
#include <sch_component.h>
|
||||||
|
|
||||||
#include <dialog_edit_one_field.h>
|
#include <dialog_edit_one_field.h>
|
||||||
|
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::EditComponentFieldText( SCH_FIELD* aField, wxDC* aDC )
|
void SCH_EDIT_FRAME::EditComponentFieldText( SCH_FIELD* aField )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( aField != NULL && aField->Type() == SCH_FIELD_T,
|
wxCHECK_RET( aField != NULL && aField->Type() == SCH_FIELD_T,
|
||||||
wxT( "Cannot edit invalid schematic field." ) );
|
wxT( "Cannot edit invalid schematic field." ) );
|
||||||
|
@ -81,7 +80,6 @@ create a new power component with the new value." ), GetChars( entry->GetName()
|
||||||
wxString title;
|
wxString title;
|
||||||
title.Printf( _( "Edit %s Field" ), GetChars( aField->GetName() ) );
|
title.Printf( _( "Edit %s Field" ), GetChars( aField->GetName() ) );
|
||||||
|
|
||||||
// wxTextEntryDialog dlg( this, wxEmptyString , title, newtext );
|
|
||||||
if( aField->GetText().IsEmpty() ) // Means the field was not already in use
|
if( aField->GetText().IsEmpty() ) // Means the field was not already in use
|
||||||
{
|
{
|
||||||
aField->m_Pos = component->GetPosition();
|
aField->m_Pos = component->GetPosition();
|
||||||
|
@ -104,7 +102,7 @@ create a new power component with the new value." ), GetChars( entry->GetName()
|
||||||
{
|
{
|
||||||
if( fieldNdx == REFERENCE )
|
if( fieldNdx == REFERENCE )
|
||||||
{
|
{
|
||||||
// Test is reference is acceptable:
|
// Test if the reference string is valid:
|
||||||
if( SCH_COMPONENT::IsReferenceStringValid( newtext ) )
|
if( SCH_COMPONENT::IsReferenceStringValid( newtext ) )
|
||||||
{
|
{
|
||||||
component->SetRef( m_CurrentSheet, newtext );
|
component->SetRef( m_CurrentSheet, newtext );
|
||||||
|
@ -136,10 +134,9 @@ create a new power component with the new value." ), GetChars( entry->GetName()
|
||||||
|
|
||||||
if( can_update )
|
if( can_update )
|
||||||
{
|
{
|
||||||
aField->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
|
|
||||||
dlg.TransfertDataToField();
|
dlg.TransfertDataToField();
|
||||||
aField->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
|
|
||||||
OnModify();
|
OnModify();
|
||||||
|
m_canvas->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
component->DisplayInfo( this );
|
component->DisplayInfo( this );
|
||||||
|
|
|
@ -363,7 +363,7 @@ void SCH_EDIT_FRAME::OnLeftDClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SCH_FIELD_T:
|
case SCH_FIELD_T:
|
||||||
EditComponentFieldText( (SCH_FIELD*) item, aDC );
|
EditComponentFieldText( (SCH_FIELD*) item );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -811,15 +811,15 @@ void SCH_EDIT_FRAME::OnEditItem( wxCommandEvent& aEvent )
|
||||||
switch( aEvent.GetId() )
|
switch( aEvent.GetId() )
|
||||||
{
|
{
|
||||||
case ID_SCH_EDIT_COMPONENT_REFERENCE:
|
case ID_SCH_EDIT_COMPONENT_REFERENCE:
|
||||||
EditComponentFieldText( ( (SCH_COMPONENT*) item )->GetField( REFERENCE ), &dc );
|
EditComponentFieldText( ( (SCH_COMPONENT*) item )->GetField( REFERENCE ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_SCH_EDIT_COMPONENT_VALUE:
|
case ID_SCH_EDIT_COMPONENT_VALUE:
|
||||||
EditComponentFieldText( ( (SCH_COMPONENT*) item )->GetField( VALUE ), &dc );
|
EditComponentFieldText( ( (SCH_COMPONENT*) item )->GetField( VALUE ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_SCH_EDIT_COMPONENT_FOOTPRINT:
|
case ID_SCH_EDIT_COMPONENT_FOOTPRINT:
|
||||||
EditComponentFieldText( ( (SCH_COMPONENT*) item )->GetField( FOOTPRINT ), &dc );
|
EditComponentFieldText( ( (SCH_COMPONENT*) item )->GetField( FOOTPRINT ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_SCH_EDIT_ITEM:
|
case ID_SCH_EDIT_ITEM:
|
||||||
|
@ -850,7 +850,7 @@ void SCH_EDIT_FRAME::OnEditItem( wxCommandEvent& aEvent )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SCH_FIELD_T:
|
case SCH_FIELD_T:
|
||||||
EditComponentFieldText( (SCH_FIELD*) item, &dc );
|
EditComponentFieldText( (SCH_FIELD*) item );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SCH_BITMAP_T:
|
case SCH_BITMAP_T:
|
||||||
|
|
|
@ -1,94 +1,92 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2008 Intel Corporation
|
Copyright 2008 Intel Corporation
|
||||||
|
|
||||||
Use, modification and distribution are subject to the Boost Software License,
|
Use, modification and distribution are subject to the Boost Software License,
|
||||||
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
http://www.boost.org/LICENSE_1_0.txt).
|
http://www.boost.org/LICENSE_1_0.txt).
|
||||||
*/
|
*/
|
||||||
#ifndef BOOST_POLYGON_POLYGON_HPP
|
#ifndef BOOST_POLYGON_POLYGON_HPP
|
||||||
#define BOOST_POLYGON_POLYGON_HPP
|
#define BOOST_POLYGON_POLYGON_HPP
|
||||||
#define BOOST_POLYGON_VERSION 014401
|
#define BOOST_POLYGON_VERSION 014401
|
||||||
|
|
||||||
#include "isotropy.hpp"
|
#include "isotropy.hpp"
|
||||||
|
|
||||||
//point
|
//point
|
||||||
#include "point_data.hpp"
|
#include "point_data.hpp"
|
||||||
#include "point_traits.hpp"
|
#include "point_traits.hpp"
|
||||||
#include "point_concept.hpp"
|
#include "point_concept.hpp"
|
||||||
|
|
||||||
//point 3d
|
//point 3d
|
||||||
#include "point_3d_data.hpp"
|
#include "point_3d_data.hpp"
|
||||||
#include "point_3d_traits.hpp"
|
#include "point_3d_traits.hpp"
|
||||||
#include "point_3d_concept.hpp"
|
#include "point_3d_concept.hpp"
|
||||||
|
|
||||||
#include "transform.hpp"
|
#include "transform.hpp"
|
||||||
#include "detail/transform_detail.hpp"
|
#include "detail/transform_detail.hpp"
|
||||||
#include "detail/polygon_sort_adaptor.hpp"
|
#include "detail/polygon_sort_adaptor.hpp"
|
||||||
|
|
||||||
#include "detail/polygon_sort_adaptor.hpp"
|
//interval
|
||||||
|
#include "interval_data.hpp"
|
||||||
//interval
|
#include "interval_traits.hpp"
|
||||||
#include "interval_data.hpp"
|
#include "interval_concept.hpp"
|
||||||
#include "interval_traits.hpp"
|
|
||||||
#include "interval_concept.hpp"
|
//rectangle
|
||||||
|
#include "rectangle_data.hpp"
|
||||||
//rectangle
|
#include "rectangle_traits.hpp"
|
||||||
#include "rectangle_data.hpp"
|
#include "rectangle_concept.hpp"
|
||||||
#include "rectangle_traits.hpp"
|
|
||||||
#include "rectangle_concept.hpp"
|
//algorithms needed by polygon types
|
||||||
|
#include "detail/iterator_points_to_compact.hpp"
|
||||||
//algorithms needed by polygon types
|
#include "detail/iterator_compact_to_points.hpp"
|
||||||
#include "detail/iterator_points_to_compact.hpp"
|
|
||||||
#include "detail/iterator_compact_to_points.hpp"
|
//polygons
|
||||||
|
#include "polygon_45_data.hpp"
|
||||||
//polygons
|
#include "polygon_data.hpp"
|
||||||
#include "polygon_45_data.hpp"
|
#include "polygon_90_data.hpp"
|
||||||
#include "polygon_data.hpp"
|
#include "polygon_90_with_holes_data.hpp"
|
||||||
#include "polygon_90_data.hpp"
|
#include "polygon_45_with_holes_data.hpp"
|
||||||
#include "polygon_90_with_holes_data.hpp"
|
#include "polygon_with_holes_data.hpp"
|
||||||
#include "polygon_45_with_holes_data.hpp"
|
#include "polygon_traits.hpp"
|
||||||
#include "polygon_with_holes_data.hpp"
|
|
||||||
#include "polygon_traits.hpp"
|
//manhattan boolean algorithms
|
||||||
|
#include "detail/boolean_op.hpp"
|
||||||
//manhattan boolean algorithms
|
#include "detail/polygon_formation.hpp"
|
||||||
#include "detail/boolean_op.hpp"
|
#include "detail/rectangle_formation.hpp"
|
||||||
#include "detail/polygon_formation.hpp"
|
#include "detail/max_cover.hpp"
|
||||||
#include "detail/rectangle_formation.hpp"
|
#include "detail/property_merge.hpp"
|
||||||
#include "detail/max_cover.hpp"
|
#include "detail/polygon_90_touch.hpp"
|
||||||
#include "detail/property_merge.hpp"
|
#include "detail/iterator_geometry_to_set.hpp"
|
||||||
#include "detail/polygon_90_touch.hpp"
|
|
||||||
#include "detail/iterator_geometry_to_set.hpp"
|
//45 boolean op algorithms
|
||||||
|
#include "detail/boolean_op_45.hpp"
|
||||||
//45 boolean op algorithms
|
#include "detail/polygon_45_formation.hpp"
|
||||||
#include "detail/boolean_op_45.hpp"
|
|
||||||
#include "detail/polygon_45_formation.hpp"
|
//polygon set data types
|
||||||
|
#include "polygon_90_set_data.hpp"
|
||||||
//polygon set data types
|
//polygon set trait types
|
||||||
#include "polygon_90_set_data.hpp"
|
#include "polygon_90_set_traits.hpp"
|
||||||
//polygon set trait types
|
//polygon set concepts
|
||||||
#include "polygon_90_set_traits.hpp"
|
#include "polygon_90_set_concept.hpp"
|
||||||
//polygon set concepts
|
//boolean operator syntax
|
||||||
#include "polygon_90_set_concept.hpp"
|
#include "detail/polygon_90_set_view.hpp"
|
||||||
//boolean operator syntax
|
|
||||||
#include "detail/polygon_90_set_view.hpp"
|
//45 boolean op algorithms
|
||||||
|
#include "detail/polygon_45_touch.hpp"
|
||||||
//45 boolean op algorithms
|
#include "detail/property_merge_45.hpp"
|
||||||
#include "detail/polygon_45_touch.hpp"
|
#include "polygon_45_set_data.hpp"
|
||||||
#include "detail/property_merge_45.hpp"
|
#include "polygon_45_set_traits.hpp"
|
||||||
#include "polygon_45_set_data.hpp"
|
#include "polygon_45_set_concept.hpp"
|
||||||
#include "polygon_45_set_traits.hpp"
|
#include "detail/polygon_45_set_view.hpp"
|
||||||
#include "polygon_45_set_concept.hpp"
|
|
||||||
#include "detail/polygon_45_set_view.hpp"
|
//arbitrary polygon algorithms
|
||||||
|
#include "detail/polygon_arbitrary_formation.hpp"
|
||||||
//arbitrary polygon algorithms
|
#include "polygon_set_data.hpp"
|
||||||
#include "detail/polygon_arbitrary_formation.hpp"
|
|
||||||
#include "polygon_set_data.hpp"
|
//general scanline
|
||||||
|
#include "detail/scan_arbitrary.hpp"
|
||||||
//general scanline
|
#include "polygon_set_traits.hpp"
|
||||||
#include "detail/scan_arbitrary.hpp"
|
#include "detail/polygon_set_view.hpp"
|
||||||
#include "polygon_set_traits.hpp"
|
|
||||||
#include "detail/polygon_set_view.hpp"
|
#include "polygon_set_concept.hpp"
|
||||||
|
|
||||||
#include "polygon_set_concept.hpp"
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ extern const wxString NetlistFileWildcard;
|
||||||
extern const wxString GerberFileWildcard;
|
extern const wxString GerberFileWildcard;
|
||||||
extern const wxString LegacyPcbFileWildcard;
|
extern const wxString LegacyPcbFileWildcard;
|
||||||
extern const wxString PcbFileWildcard;
|
extern const wxString PcbFileWildcard;
|
||||||
|
extern const wxString EaglePcbFileWildcard;
|
||||||
extern const wxString PdfFileWildcard;
|
extern const wxString PdfFileWildcard;
|
||||||
extern const wxString MacrosFileWildcard;
|
extern const wxString MacrosFileWildcard;
|
||||||
extern const wxString AllFilesWildcard;
|
extern const wxString AllFilesWildcard;
|
||||||
|
|
|
@ -238,9 +238,10 @@ public:
|
||||||
* Function CursorGoto
|
* Function CursorGoto
|
||||||
* positions the cursor at a given coordinate and reframes the drawing if the
|
* positions the cursor at a given coordinate and reframes the drawing if the
|
||||||
* requested point is out of view.
|
* requested point is out of view.
|
||||||
* @param aPos The point to go to.
|
* @param aPos is the point to go to.
|
||||||
|
* @param aWarp is true if the pointer should be warped to the new position.
|
||||||
*/
|
*/
|
||||||
void CursorGoto( const wxPoint& aPos );
|
void CursorGoto( const wxPoint& aPos, bool aWarp = true );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function Save_Module_In_Library
|
* Function Save_Module_In_Library
|
||||||
|
@ -319,10 +320,14 @@ public:
|
||||||
* Function ResetModuleTextSizes
|
* Function ResetModuleTextSizes
|
||||||
* resets text size and width of all module text fields of given field
|
* resets text size and width of all module text fields of given field
|
||||||
* type to current settings in Preferences->Dimensions->Texts and Drawings.
|
* type to current settings in Preferences->Dimensions->Texts and Drawings.
|
||||||
* @param aType is the field type (TEXT_is_REFERENCE, TEXT_is_VALUE, or TEXT_is_DIVERS).
|
* @param aFilter is a filter: footprint names must match this filter.
|
||||||
* @param aDC is the drawing context.
|
* an empty filter, or "*" do not filter anything.
|
||||||
|
* @param aRef = true to modify the reference of footprints.
|
||||||
|
* @param aValue = true to modify the value of footprints.
|
||||||
|
* @param aOthers = true to modify the other fields of footprints.
|
||||||
*/
|
*/
|
||||||
void ResetModuleTextSizes( int aType, wxDC* aDC );
|
void ResetModuleTextSizes( const wxString & aFilter, bool aRef,
|
||||||
|
bool aValue, bool aOthers );
|
||||||
|
|
||||||
void InstallPadOptionsFrame( D_PAD* pad );
|
void InstallPadOptionsFrame( D_PAD* pad );
|
||||||
void InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, wxDC* DC );
|
void InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, wxDC* DC );
|
||||||
|
|
|
@ -963,7 +963,14 @@ private:
|
||||||
void ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC );
|
void ConvertPart( SCH_COMPONENT* DrawComponent, wxDC* DC );
|
||||||
void SetInitCmp( SCH_COMPONENT* DrawComponent, wxDC* DC );
|
void SetInitCmp( SCH_COMPONENT* DrawComponent, wxDC* DC );
|
||||||
|
|
||||||
void EditComponentFieldText( SCH_FIELD* aField, wxDC* aDC );
|
/**
|
||||||
|
* Function EditComponentFieldText
|
||||||
|
* displays the edit field dialog to edit the parameters of \a aField.
|
||||||
|
*
|
||||||
|
* @param aField is a pointer to the SCH_FIELD object to be edited.
|
||||||
|
*/
|
||||||
|
void EditComponentFieldText( SCH_FIELD* aField );
|
||||||
|
|
||||||
void RotateField( SCH_FIELD* aField, wxDC* aDC );
|
void RotateField( SCH_FIELD* aField, wxDC* aDC );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -481,6 +481,13 @@ public:
|
||||||
void Tracks_and_Vias_Size_Event( wxCommandEvent& event );
|
void Tracks_and_Vias_Size_Event( wxCommandEvent& event );
|
||||||
void OnSelectTool( wxCommandEvent& aEvent );
|
void OnSelectTool( wxCommandEvent& aEvent );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function OnResetModuleTextSizes
|
||||||
|
* resets text size and width of all module text fields of given field
|
||||||
|
* type to current settings in Preferences
|
||||||
|
*/
|
||||||
|
void OnResetModuleTextSizes( wxCommandEvent& event );
|
||||||
|
|
||||||
void ProcessMuWaveFunctions( wxCommandEvent& event );
|
void ProcessMuWaveFunctions( wxCommandEvent& event );
|
||||||
void MuWaveCommand( wxDC* DC, const wxPoint& MousePos );
|
void MuWaveCommand( wxDC* DC, const wxPoint& MousePos );
|
||||||
|
|
||||||
|
@ -921,6 +928,7 @@ public:
|
||||||
|
|
||||||
// Handling texts on the board
|
// Handling texts on the board
|
||||||
void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
||||||
|
void FlipTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC );
|
||||||
TEXTE_PCB* Create_Texte_Pcb( wxDC* DC );
|
TEXTE_PCB* Create_Texte_Pcb( wxDC* DC );
|
||||||
void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
||||||
void StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
void StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC );
|
||||||
|
@ -1488,7 +1496,7 @@ public:
|
||||||
|
|
||||||
void Clean_Pcb( wxDC* DC );
|
void Clean_Pcb( wxDC* DC );
|
||||||
|
|
||||||
void InstallFindFrame( const wxPoint& pos, wxDC* DC );
|
void InstallFindFrame();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SendMessageToEESCHEMA
|
* Function SendMessageToEESCHEMA
|
||||||
|
|
|
@ -55,6 +55,8 @@ set(PCBNEW_DIALOGS
|
||||||
dialogs/dialog_edit_module_text_base.cpp
|
dialogs/dialog_edit_module_text_base.cpp
|
||||||
dialogs/dialog_exchange_modules_base.cpp
|
dialogs/dialog_exchange_modules_base.cpp
|
||||||
dialogs/dialog_export_3Dfiles_base.cpp
|
dialogs/dialog_export_3Dfiles_base.cpp
|
||||||
|
dialogs/dialog_find_base.cpp
|
||||||
|
dialogs/dialog_find.cpp
|
||||||
dialogs/dialog_freeroute_exchange.cpp
|
dialogs/dialog_freeroute_exchange.cpp
|
||||||
dialogs/dialog_freeroute_exchange_base.cpp
|
dialogs/dialog_freeroute_exchange_base.cpp
|
||||||
dialogs/dialog_gendrill.cpp
|
dialogs/dialog_gendrill.cpp
|
||||||
|
@ -64,6 +66,8 @@ set(PCBNEW_DIALOGS
|
||||||
dialogs/dialog_general_options_BoardEditor_base.cpp
|
dialogs/dialog_general_options_BoardEditor_base.cpp
|
||||||
dialogs/dialog_global_edit_tracks_and_vias.cpp
|
dialogs/dialog_global_edit_tracks_and_vias.cpp
|
||||||
dialogs/dialog_global_edit_tracks_and_vias_base.cpp
|
dialogs/dialog_global_edit_tracks_and_vias_base.cpp
|
||||||
|
dialogs/dialog_global_modules_fields_edition.cpp
|
||||||
|
dialogs/dialog_global_modules_fields_edition_base.cpp
|
||||||
dialogs/dialog_global_pads_edition_base.cpp
|
dialogs/dialog_global_pads_edition_base.cpp
|
||||||
dialogs/dialog_graphic_items_options.cpp
|
dialogs/dialog_graphic_items_options.cpp
|
||||||
dialogs/dialog_graphic_items_options_base.cpp
|
dialogs/dialog_graphic_items_options_base.cpp
|
||||||
|
@ -144,7 +148,6 @@ set(PCBNEW_CLASS_SRCS
|
||||||
export_gencad.cpp
|
export_gencad.cpp
|
||||||
export_vrml.cpp
|
export_vrml.cpp
|
||||||
files.cpp
|
files.cpp
|
||||||
find.cpp
|
|
||||||
gen_drill_report_files.cpp
|
gen_drill_report_files.cpp
|
||||||
gen_holes_and_tools_lists_for_drill.cpp
|
gen_holes_and_tools_lists_for_drill.cpp
|
||||||
gen_modules_placefile.cpp
|
gen_modules_placefile.cpp
|
||||||
|
|
|
@ -266,28 +266,31 @@ double PCB_BASE_FRAME::BestZoom()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCB_BASE_FRAME::CursorGoto( const wxPoint& aPos )
|
void PCB_BASE_FRAME::CursorGoto( const wxPoint& aPos, bool aWarp )
|
||||||
{
|
{
|
||||||
// factored out of pcbnew/find.cpp
|
// factored out of pcbnew/find.cpp
|
||||||
|
|
||||||
PCB_SCREEN* screen = (PCB_SCREEN*)GetScreen();
|
PCB_SCREEN* screen = (PCB_SCREEN*)GetScreen();
|
||||||
|
|
||||||
wxClientDC dc( m_canvas );
|
INSTALL_UNBUFFERED_DC( dc, m_canvas );
|
||||||
|
|
||||||
// There may be need to reframe the drawing.
|
// There may be need to reframe the drawing.
|
||||||
if( !m_canvas->IsPointOnDisplay( aPos ) )
|
if( !m_canvas->IsPointOnDisplay( aPos ) )
|
||||||
{
|
{
|
||||||
screen->SetCrossHairPosition( aPos );
|
screen->SetCrossHairPosition( aPos );
|
||||||
RedrawScreen( aPos, true );
|
RedrawScreen( aPos, aWarp );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Put cursor on item position
|
// Put cursor on item position
|
||||||
m_canvas->CrossHairOff( &dc );
|
m_canvas->CrossHairOff( &dc );
|
||||||
screen->SetCrossHairPosition( aPos );
|
screen->SetCrossHairPosition( aPos );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
|
||||||
m_canvas->CrossHairOn( &dc );
|
if( aWarp )
|
||||||
|
m_canvas->MoveCursorToCrossHair();
|
||||||
}
|
}
|
||||||
|
m_canvas->CrossHairOn( &dc );
|
||||||
|
m_canvas->CrossHairOn( &dc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,12 @@ BOARD::~BOARD()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void BOARD::Move( const wxPoint& aMoveVector ) // overload
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void BOARD::chainMarkedSegments( wxPoint aPosition, int aLayerMask, TRACK_PTRS* aList )
|
void BOARD::chainMarkedSegments( wxPoint aPosition, int aLayerMask, TRACK_PTRS* aList )
|
||||||
{
|
{
|
||||||
TRACK* segment; // The current segment being analyzed.
|
TRACK* segment; // The current segment being analyzed.
|
||||||
|
@ -1468,7 +1474,7 @@ int BOARD::SetAreasNetCodesFromNetNames( void )
|
||||||
|
|
||||||
if( GetArea( ii )->GetNet() != 0 ) // i.e. if this zone is connected to a net
|
if( GetArea( ii )->GetNet() != 0 ) // i.e. if this zone is connected to a net
|
||||||
{
|
{
|
||||||
const NETINFO_ITEM* net = FindNet( GetArea( ii )->m_Netname );
|
const NETINFO_ITEM* net = FindNet( GetArea( ii )->GetNetName() );
|
||||||
|
|
||||||
if( net )
|
if( net )
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* @brief Class BOARD to handle a board.
|
* @brief Class BOARD to handle a board.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CLASS_BOARD_H
|
#ifndef CLASS_BOARD_H_
|
||||||
#define CLASS_BOARD_H
|
#define CLASS_BOARD_H_
|
||||||
|
|
||||||
|
|
||||||
#include <dlist.h>
|
#include <dlist.h>
|
||||||
|
@ -255,10 +255,11 @@ public:
|
||||||
BOARD();
|
BOARD();
|
||||||
~BOARD();
|
~BOARD();
|
||||||
|
|
||||||
|
void Move( const wxPoint& aMoveVector ); // overload
|
||||||
|
|
||||||
void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
|
void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
|
||||||
int GetFileFormatVersionAtLoad() const { return m_fileFormatVersionAtLoad; }
|
int GetFileFormatVersionAtLoad() const { return m_fileFormatVersionAtLoad; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetDefaultLayerName
|
* Function GetDefaultLayerName
|
||||||
* returns a default name of a PCB layer when given \a aLayerNumber. This
|
* returns a default name of a PCB layer when given \a aLayerNumber. This
|
||||||
|
@ -1327,4 +1328,4 @@ public:
|
||||||
TRACK* CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS_LIST* aList );
|
TRACK* CreateLockPoint( wxPoint& aPosition, TRACK* aSegment, PICKED_ITEMS_LIST* aList );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // #ifndef CLASS_BOARD_H
|
#endif // CLASS_BOARD_H_
|
||||||
|
|
|
@ -206,7 +206,7 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx
|
||||||
|
|
||||||
if( ( draw_mode & GR_ALLOW_HIGHCONTRAST ) && DisplayOpt.ContrastModeDisplay )
|
if( ( draw_mode & GR_ALLOW_HIGHCONTRAST ) && DisplayOpt.ContrastModeDisplay )
|
||||||
{
|
{
|
||||||
if( !IsOnLayer( curr_layer ) )
|
if( !IsOnLayer( curr_layer ) && !IsOnLayer( EDGE_N ) )
|
||||||
{
|
{
|
||||||
color &= ~MASKCOLOR;
|
color &= ~MASKCOLOR;
|
||||||
color |= DARKDARKGRAY;
|
color |= DARKDARKGRAY;
|
||||||
|
|
|
@ -42,14 +42,11 @@ class EDA_DRAW_FRAME;
|
||||||
|
|
||||||
class EDGE_MODULE : public DRAWSEGMENT
|
class EDGE_MODULE : public DRAWSEGMENT
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
wxPoint m_Start0; // Start point or center, relative to module origin, orient 0.
|
|
||||||
wxPoint m_End0; // End point, relative to module origin, orient 0.
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EDGE_MODULE( MODULE* parent, STROKE_T aShape = S_SEGMENT );
|
EDGE_MODULE( MODULE* parent, STROKE_T aShape = S_SEGMENT );
|
||||||
|
|
||||||
// Do not create a copy constructor. The one generated by the compiler is adequate.
|
// Do not create a copy constructor. The one generated by the compiler is adequate.
|
||||||
|
// EDGE_MODULE( const EDGE_MODULE& );
|
||||||
|
|
||||||
~EDGE_MODULE();
|
~EDGE_MODULE();
|
||||||
|
|
||||||
|
@ -90,6 +87,11 @@ public:
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//protected: @todo: is it just me?
|
||||||
|
|
||||||
|
wxPoint m_Start0; // Start point or center, relative to module origin, orient 0.
|
||||||
|
wxPoint m_End0; // End point, relative to module origin, orient 0.
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CLASS_EDGE_MOD_H_
|
#endif // CLASS_EDGE_MOD_H_
|
||||||
|
|
|
@ -161,7 +161,10 @@ void TEXTE_PCB::Flip(const wxPoint& aCentre )
|
||||||
{
|
{
|
||||||
m_Pos.y = aCentre.y - ( m_Pos.y - aCentre.y );
|
m_Pos.y = aCentre.y - ( m_Pos.y - aCentre.y );
|
||||||
// NEGATE( m_Orient ); not needed: m_Mirror handles this
|
// NEGATE( m_Orient ); not needed: m_Mirror handles this
|
||||||
if( ( GetLayer() == LAYER_N_BACK ) || ( GetLayer() == LAYER_N_FRONT ) )
|
if( GetLayer() == LAYER_N_BACK
|
||||||
|
|| GetLayer() == LAYER_N_FRONT
|
||||||
|
|| GetLayer() == SILKSCREEN_N_BACK
|
||||||
|
|| GetLayer() == SILKSCREEN_N_FRONT )
|
||||||
{
|
{
|
||||||
m_Mirror = not m_Mirror; /* inverse mirror */
|
m_Mirror = not m_Mirror; /* inverse mirror */
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, int text_type ) :
|
||||||
BOARD_ITEM( parent, PCB_MODULE_TEXT_T ),
|
BOARD_ITEM( parent, PCB_MODULE_TEXT_T ),
|
||||||
EDA_TEXT()
|
EDA_TEXT()
|
||||||
{
|
{
|
||||||
MODULE* Module = (MODULE*) m_Parent;
|
MODULE* module = (MODULE*) m_Parent;
|
||||||
|
|
||||||
m_Type = text_type; /* Reference */
|
m_Type = text_type; /* Reference */
|
||||||
|
|
||||||
|
@ -63,11 +63,11 @@ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, int text_type ) :
|
||||||
|
|
||||||
SetLayer( SILKSCREEN_N_FRONT );
|
SetLayer( SILKSCREEN_N_FRONT );
|
||||||
|
|
||||||
if( Module && ( Module->Type() == PCB_MODULE_T ) )
|
if( module && ( module->Type() == PCB_MODULE_T ) )
|
||||||
{
|
{
|
||||||
m_Pos = Module->m_Pos;
|
m_Pos = module->m_Pos;
|
||||||
|
|
||||||
int moduleLayer = Module->GetLayer();
|
int moduleLayer = module->GetLayer();
|
||||||
|
|
||||||
if( moduleLayer == LAYER_N_BACK )
|
if( moduleLayer == LAYER_N_BACK )
|
||||||
SetLayer( SILKSCREEN_N_BACK );
|
SetLayer( SILKSCREEN_N_BACK );
|
||||||
|
@ -120,18 +120,18 @@ int TEXTE_MODULE::GetLength() const
|
||||||
// Update draw coordinates
|
// Update draw coordinates
|
||||||
void TEXTE_MODULE::SetDrawCoord()
|
void TEXTE_MODULE::SetDrawCoord()
|
||||||
{
|
{
|
||||||
MODULE* Module = (MODULE*) m_Parent;
|
MODULE* module = (MODULE*) m_Parent;
|
||||||
|
|
||||||
m_Pos = m_Pos0;
|
m_Pos = m_Pos0;
|
||||||
|
|
||||||
if( Module == NULL )
|
if( module == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int angle = Module->m_Orient;
|
double angle = module->GetOrientation();
|
||||||
NORMALIZE_ANGLE_POS( angle );
|
NORMALIZE_ANGLE_POS( angle );
|
||||||
|
|
||||||
RotatePoint( &m_Pos.x, &m_Pos.y, angle );
|
RotatePoint( &m_Pos.x, &m_Pos.y, angle );
|
||||||
m_Pos += Module->m_Pos;
|
m_Pos += module->GetPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -139,17 +139,17 @@ void TEXTE_MODULE::SetDrawCoord()
|
||||||
// anchor point)
|
// anchor point)
|
||||||
void TEXTE_MODULE::SetLocalCoord()
|
void TEXTE_MODULE::SetLocalCoord()
|
||||||
{
|
{
|
||||||
MODULE* Module = (MODULE*) m_Parent;
|
MODULE* module = (MODULE*) m_Parent;
|
||||||
|
|
||||||
if( Module == NULL )
|
if( module == NULL )
|
||||||
{
|
{
|
||||||
m_Pos0 = m_Pos;
|
m_Pos0 = m_Pos;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Pos0 = m_Pos - Module->m_Pos;
|
m_Pos0 = m_Pos - module->m_Pos;
|
||||||
|
|
||||||
int angle = Module->m_Orient;
|
int angle = module->m_Orient;
|
||||||
NORMALIZE_ANGLE_POS( angle );
|
NORMALIZE_ANGLE_POS( angle );
|
||||||
|
|
||||||
RotatePoint( &m_Pos0.x, &m_Pos0.y, -angle );
|
RotatePoint( &m_Pos0.x, &m_Pos0.y, -angle );
|
||||||
|
@ -242,7 +242,7 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const w
|
||||||
wxSize size;
|
wxSize size;
|
||||||
wxPoint pos; // Center of text
|
wxPoint pos; // Center of text
|
||||||
PCB_BASE_FRAME* frame;
|
PCB_BASE_FRAME* frame;
|
||||||
MODULE* Module = (MODULE*) m_Parent; /* parent must *not* be null
|
MODULE* module = (MODULE*) m_Parent; /* parent must *not* be null
|
||||||
* (a module text without a footprint
|
* (a module text without a footprint
|
||||||
* parent has no sense) */
|
* parent has no sense) */
|
||||||
|
|
||||||
|
@ -282,16 +282,16 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const w
|
||||||
pos.x, pos.y + anchor_size, 0, color );
|
pos.x, pos.y + anchor_size, 0, color );
|
||||||
}
|
}
|
||||||
|
|
||||||
color = brd->GetLayerColor(Module->GetLayer());
|
color = brd->GetLayerColor(module->GetLayer());
|
||||||
|
|
||||||
|
|
||||||
if( Module->GetLayer() == LAYER_N_BACK )
|
if( module->GetLayer() == LAYER_N_BACK )
|
||||||
{
|
{
|
||||||
if( brd->IsElementVisible( MOD_TEXT_BK_VISIBLE ) == false )
|
if( brd->IsElementVisible( MOD_TEXT_BK_VISIBLE ) == false )
|
||||||
return;
|
return;
|
||||||
color = brd->GetVisibleElementColor(MOD_TEXT_BK_VISIBLE);
|
color = brd->GetVisibleElementColor(MOD_TEXT_BK_VISIBLE);
|
||||||
}
|
}
|
||||||
else if( Module->GetLayer() == LAYER_N_FRONT )
|
else if( module->GetLayer() == LAYER_N_FRONT )
|
||||||
{
|
{
|
||||||
if( brd->IsElementVisible( MOD_TEXT_FR_VISIBLE ) == false )
|
if( brd->IsElementVisible( MOD_TEXT_FR_VISIBLE ) == false )
|
||||||
return;
|
return;
|
||||||
|
@ -336,12 +336,12 @@ void TEXTE_MODULE::DrawUmbilical( EDA_DRAW_PANEL* aPanel,
|
||||||
int TEXTE_MODULE::GetDrawRotation() const
|
int TEXTE_MODULE::GetDrawRotation() const
|
||||||
{
|
{
|
||||||
int rotation;
|
int rotation;
|
||||||
MODULE* Module = (MODULE*) m_Parent;
|
MODULE* module = (MODULE*) m_Parent;
|
||||||
|
|
||||||
rotation = m_Orient;
|
rotation = m_Orient;
|
||||||
|
|
||||||
if( Module )
|
if( module )
|
||||||
rotation += Module->m_Orient;
|
rotation += module->m_Orient;
|
||||||
|
|
||||||
NORMALIZE_ANGLE_POS( rotation );
|
NORMALIZE_ANGLE_POS( rotation );
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) :
|
||||||
|
|
||||||
// For corner moving, corner index to drag, or -1 if no selection
|
// For corner moving, corner index to drag, or -1 if no selection
|
||||||
m_CornerSelection = -1;
|
m_CornerSelection = -1;
|
||||||
|
m_IsFilled = aZone.m_IsFilled;
|
||||||
m_ZoneClearance = aZone.m_ZoneClearance; // clearance value
|
m_ZoneClearance = aZone.m_ZoneClearance; // clearance value
|
||||||
m_ZoneMinThickness = aZone.m_ZoneMinThickness;
|
m_ZoneMinThickness = aZone.m_ZoneMinThickness;
|
||||||
m_FillMode = aZone.m_FillMode; // Filling mode (segments/polygons)
|
m_FillMode = aZone.m_FillMode; // Filling mode (segments/polygons)
|
||||||
|
@ -84,6 +85,11 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) :
|
||||||
m_ThermalReliefCopperBridge = aZone.m_ThermalReliefCopperBridge;
|
m_ThermalReliefCopperBridge = aZone.m_ThermalReliefCopperBridge;
|
||||||
m_FilledPolysList = aZone.m_FilledPolysList;
|
m_FilledPolysList = aZone.m_FilledPolysList;
|
||||||
m_FillSegmList = aZone.m_FillSegmList;
|
m_FillSegmList = aZone.m_FillSegmList;
|
||||||
|
|
||||||
|
cornerSmoothingType = aZone.cornerSmoothingType;
|
||||||
|
cornerRadius = aZone.cornerRadius;
|
||||||
|
utility = aZone.utility;
|
||||||
|
utility2 = aZone.utility;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -717,7 +723,7 @@ void ZONE_CONTAINER::DisplayInfo( EDA_DRAW_FRAME* frame )
|
||||||
frame->AppendMsgPanel( _( "Corners" ), msg, BLUE );
|
frame->AppendMsgPanel( _( "Corners" ), msg, BLUE );
|
||||||
|
|
||||||
if( m_FillMode )
|
if( m_FillMode )
|
||||||
msg.Printf( _( "Segments" ), m_FillMode );
|
msg = _( "Segments" );
|
||||||
else
|
else
|
||||||
msg = _( "Polygons" );
|
msg = _( "Polygons" );
|
||||||
|
|
||||||
|
|
|
@ -77,58 +77,7 @@ struct SEGMENT
|
||||||
class ZONE_CONTAINER : public BOARD_CONNECTED_ITEM
|
class ZONE_CONTAINER : public BOARD_CONNECTED_ITEM
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxString m_Netname; // Net Name
|
|
||||||
CPolyLine* m_Poly; // outlines
|
|
||||||
|
|
||||||
// For corner moving, corner index to drag, or -1 if no selection.
|
|
||||||
int m_CornerSelection;
|
|
||||||
int m_ZoneClearance; // clearance value
|
|
||||||
int m_ZoneMinThickness; // Min thickness value in filled areas
|
|
||||||
|
|
||||||
// How to fill areas: 0 = use filled polygons, != 0 fill with segments.
|
|
||||||
int m_FillMode;
|
|
||||||
|
|
||||||
// number of segments to convert a circle to a polygon (uses
|
|
||||||
//ARC_APPROX_SEGMENTS_COUNT_LOW_DEF or ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF)
|
|
||||||
int m_ArcToSegmentsCount;
|
|
||||||
|
|
||||||
// thickness of the gap in thermal reliefs.
|
|
||||||
int m_ThermalReliefGap;
|
|
||||||
|
|
||||||
// thickness of the copper bridge in thermal reliefs
|
|
||||||
int m_ThermalReliefCopperBridge;
|
|
||||||
int utility, utility2; // flags used in polygon calculations
|
|
||||||
|
|
||||||
// true when a zone was filled, false after deleting the filled areas
|
|
||||||
bool m_IsFilled;
|
|
||||||
|
|
||||||
/* set of filled polygons used to draw a zone as a filled area.
|
|
||||||
* from outlines (m_Poly) but unlike m_Poly these filled polygons have no hole
|
|
||||||
* (they are* all in one piece) In very simple cases m_FilledPolysList is same
|
|
||||||
* as m_Poly. In less simple cases (when m_Poly has holes) m_FilledPolysList is
|
|
||||||
* a polygon equivalent to m_Poly, without holes but with extra outline segment
|
|
||||||
* connecting "holes" with external main outline. In complex cases an outline
|
|
||||||
* described by m_Poly can have many filled areas
|
|
||||||
*/
|
|
||||||
std::vector <CPolyPt> m_FilledPolysList;
|
|
||||||
|
|
||||||
/* set of segments used to fill area, when fill zone by segment is used.
|
|
||||||
* ( m_FillMode == 1 )
|
|
||||||
* in this case segments have m_ZoneMinThickness width
|
|
||||||
*/
|
|
||||||
std::vector <SEGMENT> m_FillSegmList;
|
|
||||||
|
|
||||||
private:
|
|
||||||
CPolyLine* smoothedPoly; // Corner-smoothed version of m_Poly
|
|
||||||
int cornerSmoothingType;
|
|
||||||
unsigned int cornerRadius;
|
|
||||||
// Priority: when a zone outline is inside and other zone, if its priority is higher
|
|
||||||
// the other zone priority, it will be created inside.
|
|
||||||
// if priorities are equal, a DRC error is set
|
|
||||||
unsigned m_priority;
|
|
||||||
ZoneConnection m_PadConnection;
|
|
||||||
|
|
||||||
public:
|
|
||||||
ZONE_CONTAINER( BOARD* parent );
|
ZONE_CONTAINER( BOARD* parent );
|
||||||
|
|
||||||
ZONE_CONTAINER( const ZONE_CONTAINER& aZone );
|
ZONE_CONTAINER( const ZONE_CONTAINER& aZone );
|
||||||
|
@ -257,13 +206,13 @@ public:
|
||||||
* returns the net name.
|
* returns the net name.
|
||||||
* @return const wxString& - The net name.
|
* @return const wxString& - The net name.
|
||||||
*/
|
*/
|
||||||
const wxString& GetNetName() const { return m_Netname; };
|
const wxString& GetNetName() const { return m_Netname; };
|
||||||
void SetNetName( const wxString& aName ) { m_Netname = aName; }
|
void SetNetName( const wxString& aName ) { m_Netname = aName; }
|
||||||
|
|
||||||
void SetFillMode( int aFillMode ) { m_FillMode = aFillMode; }
|
void SetFillMode( int aFillMode ) { m_FillMode = aFillMode; }
|
||||||
int GetFillMode() const { return m_FillMode; }
|
int GetFillMode() const { return m_FillMode; }
|
||||||
|
|
||||||
void SetThermalReliefGap( int aThermalReliefGap ) { m_ThermalReliefGap = aThermalReliefGap; }
|
void SetThermalReliefGap( int aThermalReliefGap ) { m_ThermalReliefGap = aThermalReliefGap; }
|
||||||
int GetThermalReliefGap( D_PAD* aPad = NULL ) const;
|
int GetThermalReliefGap( D_PAD* aPad = NULL ) const;
|
||||||
|
|
||||||
void SetThermalReliefCopperBridge( int aThermalReliefCopperBridge )
|
void SetThermalReliefCopperBridge( int aThermalReliefCopperBridge )
|
||||||
|
@ -508,6 +457,34 @@ public:
|
||||||
*/
|
*/
|
||||||
bool IsSame( const ZONE_CONTAINER &aZoneToCompare );
|
bool IsSame( const ZONE_CONTAINER &aZoneToCompare );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function ClearFilledPolysList
|
||||||
|
* clears the list of filled polygons.
|
||||||
|
*/
|
||||||
|
void ClearFilledPolysList()
|
||||||
|
{
|
||||||
|
m_FilledPolysList.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function GetFilledPolysList
|
||||||
|
* returns a reference to the list of filled polygons.
|
||||||
|
* @return Reference to the list of filled polygons.
|
||||||
|
*/
|
||||||
|
const std::vector<CPolyPt>& GetFilledPolysList() const
|
||||||
|
{
|
||||||
|
return m_FilledPolysList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function AddFilledPolysList
|
||||||
|
* sets the list of filled polygons.
|
||||||
|
*/
|
||||||
|
void AddFilledPolysList( std::vector<CPolyPt>& aPolysList )
|
||||||
|
{
|
||||||
|
m_FilledPolysList = aPolysList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetSmoothedPoly
|
* Function GetSmoothedPoly
|
||||||
* returns a pointer to the corner-smoothed version of
|
* returns a pointer to the corner-smoothed version of
|
||||||
|
@ -547,6 +524,59 @@ public:
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
CPolyLine* m_Poly; // outlines
|
||||||
|
|
||||||
|
// For corner moving, corner index to drag, or -1 if no selection.
|
||||||
|
int m_CornerSelection;
|
||||||
|
int m_ZoneClearance; // clearance value
|
||||||
|
int m_ZoneMinThickness; // Min thickness value in filled areas
|
||||||
|
|
||||||
|
// How to fill areas: 0 = use filled polygons, != 0 fill with segments.
|
||||||
|
int m_FillMode;
|
||||||
|
|
||||||
|
// number of segments to convert a circle to a polygon (uses
|
||||||
|
//ARC_APPROX_SEGMENTS_COUNT_LOW_DEF or ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF)
|
||||||
|
int m_ArcToSegmentsCount;
|
||||||
|
|
||||||
|
// thickness of the gap in thermal reliefs.
|
||||||
|
int m_ThermalReliefGap;
|
||||||
|
|
||||||
|
// thickness of the copper bridge in thermal reliefs
|
||||||
|
int m_ThermalReliefCopperBridge;
|
||||||
|
int utility, utility2; // flags used in polygon calculations
|
||||||
|
|
||||||
|
// true when a zone was filled, false after deleting the filled areas
|
||||||
|
bool m_IsFilled;
|
||||||
|
|
||||||
|
/* set of segments used to fill area, when fill zone by segment is used.
|
||||||
|
* ( m_FillMode == 1 )
|
||||||
|
* in this case segments have m_ZoneMinThickness width
|
||||||
|
*/
|
||||||
|
std::vector <SEGMENT> m_FillSegmList;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
wxString m_Netname; // Net Name
|
||||||
|
CPolyLine* smoothedPoly; // Corner-smoothed version of m_Poly
|
||||||
|
int cornerSmoothingType;
|
||||||
|
unsigned int cornerRadius;
|
||||||
|
// Priority: when a zone outline is inside and other zone, if its priority is higher
|
||||||
|
// the other zone priority, it will be created inside.
|
||||||
|
// if priorities are equal, a DRC error is set
|
||||||
|
unsigned m_priority;
|
||||||
|
ZoneConnection m_PadConnection;
|
||||||
|
|
||||||
|
/* set of filled polygons used to draw a zone as a filled area.
|
||||||
|
* from outlines (m_Poly) but unlike m_Poly these filled polygons have no hole
|
||||||
|
* (they are* all in one piece) In very simple cases m_FilledPolysList is same
|
||||||
|
* as m_Poly. In less simple cases (when m_Poly has holes) m_FilledPolysList is
|
||||||
|
* a polygon equivalent to m_Poly, without holes but with extra outline segment
|
||||||
|
* connecting "holes" with external main outline. In complex cases an outline
|
||||||
|
* described by m_Poly can have many filled areas
|
||||||
|
*/
|
||||||
|
std::vector <CPolyPt> m_FilledPolysList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -56,9 +56,6 @@ private:
|
||||||
|
|
||||||
wxListView* m_LayerSelectionCtrl;
|
wxListView* m_LayerSelectionCtrl;
|
||||||
|
|
||||||
static wxPoint prevPosition; ///< Dialog position & size
|
|
||||||
static wxSize prevSize;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function initDialog
|
* Function initDialog
|
||||||
* fills in the dialog controls using the current settings.
|
* fills in the dialog controls using the current settings.
|
||||||
|
@ -108,8 +105,6 @@ private:
|
||||||
|
|
||||||
// Initialize static member variables
|
// Initialize static member variables
|
||||||
wxString DIALOG_COPPER_ZONE::m_netNameShowFilter( wxT( "*" ) );
|
wxString DIALOG_COPPER_ZONE::m_netNameShowFilter( wxT( "*" ) );
|
||||||
wxPoint DIALOG_COPPER_ZONE::prevPosition( -1, -1 );
|
|
||||||
wxSize DIALOG_COPPER_ZONE::prevSize;
|
|
||||||
|
|
||||||
|
|
||||||
ZONE_EDIT_T InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings )
|
ZONE_EDIT_T InvokeCopperZonesEditor( PCB_BASE_FRAME* aCaller, ZONE_SETTINGS* aSettings )
|
||||||
|
@ -157,11 +152,7 @@ DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE( PCB_BASE_FRAME* aParent, ZONE_SETTINGS*
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
|
|
||||||
if( prevPosition.x != -1 )
|
Center();
|
||||||
SetSize( prevPosition.x, prevPosition.y,
|
|
||||||
prevSize.x, prevSize.y );
|
|
||||||
else
|
|
||||||
Center();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,8 +160,6 @@ void DIALOG_COPPER_ZONE::initDialog()
|
||||||
{
|
{
|
||||||
BOARD* board = m_Parent->GetBoard();
|
BOARD* board = m_Parent->GetBoard();
|
||||||
|
|
||||||
SetFocus(); // Required under wxGTK if we want to demiss the dialog with the ESC key
|
|
||||||
|
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
if( m_settings.m_Zone_45_Only )
|
if( m_settings.m_Zone_45_Only )
|
||||||
|
@ -297,8 +286,6 @@ void DIALOG_COPPER_ZONE::OnButtonCancelClick( wxCommandEvent& event )
|
||||||
void DIALOG_COPPER_ZONE::OnButtonOkClick( wxCommandEvent& event )
|
void DIALOG_COPPER_ZONE::OnButtonOkClick( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
m_netNameShowFilter = m_ShowNetNameFilter->GetValue();
|
m_netNameShowFilter = m_ShowNetNameFilter->GetValue();
|
||||||
prevPosition = GetPosition();
|
|
||||||
prevSize = GetSize();
|
|
||||||
|
|
||||||
if( AcceptOptions( true ) )
|
if( AcceptOptions( true ) )
|
||||||
{
|
{
|
||||||
|
@ -311,9 +298,6 @@ void DIALOG_COPPER_ZONE::OnButtonOkClick( wxCommandEvent& event )
|
||||||
// called on system close button
|
// called on system close button
|
||||||
void DIALOG_COPPER_ZONE::OnClose( wxCloseEvent& event )
|
void DIALOG_COPPER_ZONE::OnClose( wxCloseEvent& event )
|
||||||
{
|
{
|
||||||
prevPosition = GetPosition();
|
|
||||||
prevSize = GetSize();
|
|
||||||
|
|
||||||
if( m_OnExitCode != ZONE_ABORT )
|
if( m_OnExitCode != ZONE_ABORT )
|
||||||
*m_ptr = m_settings;
|
*m_ptr = m_settings;
|
||||||
|
|
||||||
|
@ -384,7 +368,7 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aPromptForErrors, bool aUseExportab
|
||||||
wxString txtvalue = m_ZoneClearanceCtrl->GetValue();
|
wxString txtvalue = m_ZoneClearanceCtrl->GetValue();
|
||||||
m_settings.m_ZoneClearance = ReturnValueFromString( g_UserUnit, txtvalue );
|
m_settings.m_ZoneClearance = ReturnValueFromString( g_UserUnit, txtvalue );
|
||||||
|
|
||||||
// Test if this is a reasonnable value for this parameter
|
// Test if this is a reasonable value for this parameter
|
||||||
// A too large value can hang Pcbnew
|
// A too large value can hang Pcbnew
|
||||||
#define CLEARANCE_MAX_VALUE 5000 // in 1/10000 inch
|
#define CLEARANCE_MAX_VALUE 5000 // in 1/10000 inch
|
||||||
if( m_settings.m_ZoneClearance > CLEARANCE_MAX_VALUE )
|
if( m_settings.m_ZoneClearance > CLEARANCE_MAX_VALUE )
|
||||||
|
@ -519,9 +503,6 @@ void DIALOG_COPPER_ZONE::OnNetSortingOptionSelected( wxCommandEvent& event )
|
||||||
|
|
||||||
void DIALOG_COPPER_ZONE::ExportSetupToOtherCopperZones( wxCommandEvent& event )
|
void DIALOG_COPPER_ZONE::ExportSetupToOtherCopperZones( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
prevPosition = GetPosition();
|
|
||||||
prevSize = GetSize();
|
|
||||||
|
|
||||||
if( !AcceptOptions( true, true ) )
|
if( !AcceptOptions( true, true ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -1,256 +1,268 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Jun 30 2011)
|
// C++ code generated with wxFormBuilder (version Apr 11 2012)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "dialog_copper_zones_base.h"
|
#include "dialog_copper_zones_base.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, wxDialog )
|
BEGIN_EVENT_TABLE( DIALOG_COPPER_ZONE_BASE, DIALOG_SHIM )
|
||||||
EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose )
|
EVT_CLOSE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnClose )
|
||||||
EVT_SIZE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnSize )
|
EVT_SIZE( DIALOG_COPPER_ZONE_BASE::_wxFB_OnSize )
|
||||||
EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected )
|
EVT_CHOICE( ID_M_NETDISPLAYOPTION, DIALOG_COPPER_ZONE_BASE::_wxFB_OnNetSortingOptionSelected )
|
||||||
EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
|
EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
|
||||||
EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
|
EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
|
||||||
EVT_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
|
EVT_BUTTON( wxID_APPLY_FILTERS, DIALOG_COPPER_ZONE_BASE::_wxFB_OnRunFiltersButtonClick )
|
||||||
EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice )
|
EVT_CHOICE( ID_CORNER_SMOOTHING, DIALOG_COPPER_ZONE_BASE::_wxFB_OnCornerSmoothingModeChoice )
|
||||||
EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick )
|
EVT_CHOICE( ID_M_PADINZONEOPT, DIALOG_COPPER_ZONE_BASE::_wxFB_OnPadsInZoneClick )
|
||||||
EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones )
|
EVT_BUTTON( wxID_BUTTON_EXPORT, DIALOG_COPPER_ZONE_BASE::_wxFB_ExportSetupToOtherCopperZones )
|
||||||
EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick )
|
EVT_BUTTON( wxID_OK, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonOkClick )
|
||||||
EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick )
|
EVT_BUTTON( wxID_CANCEL, DIALOG_COPPER_ZONE_BASE::_wxFB_OnButtonCancelClick )
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_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 );
|
||||||
|
|
||||||
m_MainBoxSizer = new wxBoxSizer( wxVERTICAL );
|
m_MainBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxBoxSizer* m_OptionsBoxSizer;
|
wxBoxSizer* m_OptionsBoxSizer;
|
||||||
m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
m_OptionsBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_layerSizer = new wxBoxSizer( wxVERTICAL );
|
m_layerSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticText17 = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText17->Wrap( -1 );
|
m_staticText17->Wrap( -1 );
|
||||||
m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 );
|
|
||||||
|
m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 );
|
||||||
wxBoxSizer* bSizer7;
|
|
||||||
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer* bSizer7;
|
||||||
|
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
||||||
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_staticText2->Wrap( -1 );
|
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Net:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizer7->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
m_staticText2->Wrap( -1 );
|
||||||
|
bSizer7->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
|
||||||
bSizer7->Add( m_ListNetNameSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
m_ListNetNameSelection = new wxListBox( this, ID_NETNAME_SELECTION, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||||
|
bSizer7->Add( m_ListNetNameSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
m_OptionsBoxSizer->Add( bSizer7, 1, wxEXPAND, 5 );
|
|
||||||
|
|
||||||
wxStaticBoxSizer* m_NetSortOptSizer;
|
m_OptionsBoxSizer->Add( bSizer7, 1, wxEXPAND, 5 );
|
||||||
m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL );
|
|
||||||
|
wxStaticBoxSizer* m_NetSortOptSizer;
|
||||||
m_staticText16 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_NetSortOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Filtering") ), wxVERTICAL );
|
||||||
m_staticText16->Wrap( -1 );
|
|
||||||
m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
m_staticText16 = new wxStaticText( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText16->Wrap( -1 );
|
||||||
wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (advanced)"), _("Filtered (alphabetical)"), _("Filtered (advanced)") };
|
m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString );
|
|
||||||
m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 );
|
wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (advanced)"), _("Filtered (alphabetical)"), _("Filtered (advanced)") };
|
||||||
m_NetDisplayOption->SetSelection( 0 );
|
int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString );
|
||||||
m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 );
|
||||||
|
m_NetDisplayOption->SetSelection( 0 );
|
||||||
m_staticText5 = new wxStaticText( this, wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_NetSortOptSizer->Add( m_NetDisplayOption, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
m_staticText5->Wrap( -1 );
|
|
||||||
m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
m_staticText5 = new wxStaticText( this, wxID_ANY, _("Hidden net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText5->Wrap( -1 );
|
||||||
m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
m_NetSortOptSizer->Add( m_staticText5, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") );
|
|
||||||
|
m_DoNotShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||||
m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
m_DoNotShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nNet names matching this pattern are not displayed.") );
|
||||||
|
|
||||||
m_staticText51 = new wxStaticText( this, wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_NetSortOptSizer->Add( m_DoNotShowNetNameFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
m_staticText51->Wrap( -1 );
|
|
||||||
m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
m_staticText51 = new wxStaticText( this, wxID_ANY, _("Visible net filter:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText51->Wrap( -1 );
|
||||||
m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
m_NetSortOptSizer->Add( m_staticText51, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") );
|
|
||||||
|
m_ShowNetNameFilter = new wxTextCtrl( this, ID_TEXTCTRL_NETNAMES_FILTER, _("*"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||||
m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
m_ShowNetNameFilter->SetToolTip( _("Pattern to filter net names in filtered list.\nOnly net names matching this pattern are displayed.") );
|
||||||
|
|
||||||
m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_NetSortOptSizer->Add( m_ShowNetNameFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 );
|
|
||||||
|
m_buttonRunFilter = new wxButton( this, wxID_APPLY_FILTERS, _("Apply Filters"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxALL, 5 );
|
m_NetSortOptSizer->Add( m_buttonRunFilter, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxALL|wxEXPAND, 5 );
|
|
||||||
|
m_OptionsBoxSizer->Add( m_NetSortOptSizer, 0, wxALL, 5 );
|
||||||
wxStaticBoxSizer* m_ExportableSetupSizer;
|
|
||||||
m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL );
|
|
||||||
|
m_MainBoxSizer->Add( m_OptionsBoxSizer, 1, wxALL|wxEXPAND, 5 );
|
||||||
wxBoxSizer* bSizer9;
|
|
||||||
bSizer9 = new wxBoxSizer( wxVERTICAL );
|
wxStaticBoxSizer* m_ExportableSetupSizer;
|
||||||
|
m_ExportableSetupSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxHORIZONTAL );
|
||||||
m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_ClearanceValueTitle->Wrap( -1 );
|
wxBoxSizer* bSizer9;
|
||||||
bSizer9->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
bSizer9 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_ZoneClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_ClearanceValueTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizer9->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
m_ClearanceValueTitle->Wrap( -1 );
|
||||||
|
bSizer9->Add( m_ClearanceValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_MinThicknessValueTitle->Wrap( -1 );
|
m_ZoneClearanceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_MinThicknessValueTitle->SetToolTip( _("Minimun thickness of filled areas.") );
|
bSizer9->Add( m_ZoneClearanceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
bSizer9->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
m_MinThicknessValueTitle = new wxStaticText( this, wxID_ANY, _("Minimum width"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_MinThicknessValueTitle->Wrap( -1 );
|
||||||
m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_MinThicknessValueTitle->SetToolTip( _("Minimun thickness of filled areas.") );
|
||||||
bSizer9->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
bSizer9->Add( m_MinThicknessValueTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
m_staticText151 = new wxStaticText( this, wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_staticText151->Wrap( -1 );
|
m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizer9->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
bSizer9->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") };
|
m_staticText151 = new wxStaticText( this, wxID_ANY, _("Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString );
|
m_staticText151->Wrap( -1 );
|
||||||
m_cornerSmoothingChoice = new wxChoice( this, ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 );
|
bSizer9->Add( m_staticText151, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
m_cornerSmoothingChoice->SetSelection( 0 );
|
|
||||||
bSizer9->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
wxString m_cornerSmoothingChoiceChoices[] = { _("None"), _("Chamfer"), _("Fillet") };
|
||||||
|
int m_cornerSmoothingChoiceNChoices = sizeof( m_cornerSmoothingChoiceChoices ) / sizeof( wxString );
|
||||||
m_cornerSmoothingTitle = new wxStaticText( this, wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cornerSmoothingChoice = new wxChoice( this, ID_CORNER_SMOOTHING, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 );
|
||||||
m_cornerSmoothingTitle->Wrap( -1 );
|
m_cornerSmoothingChoice->SetSelection( 0 );
|
||||||
bSizer9->Add( m_cornerSmoothingTitle, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
bSizer9->Add( m_cornerSmoothingChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_cornerSmoothingTitle = new wxStaticText( this, wxID_ANY, _("Chamfer distance (mm):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizer9->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
m_cornerSmoothingTitle->Wrap( -1 );
|
||||||
|
bSizer9->Add( m_cornerSmoothingTitle, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
m_ExportableSetupSizer->Add( bSizer9, 0, wxEXPAND, 5 );
|
|
||||||
|
m_cornerSmoothingCtrl = new wxTextCtrl( this, ID_M_CORNERSMOOTHINGCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
wxBoxSizer* m_LeftBox;
|
bSizer9->Add( m_cornerSmoothingCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
m_LeftBox = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
m_staticText13 = new wxStaticText( this, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_ExportableSetupSizer->Add( bSizer9, 0, wxEXPAND, 5 );
|
||||||
m_staticText13->Wrap( -1 );
|
|
||||||
m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
wxBoxSizer* m_LeftBox;
|
||||||
|
m_LeftBox = new wxBoxSizer( wxVERTICAL );
|
||||||
wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("None") };
|
|
||||||
int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString );
|
m_staticText13 = new wxStaticText( this, wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 );
|
m_staticText13->Wrap( -1 );
|
||||||
m_PadInZoneOpt->SetSelection( 0 );
|
m_LeftBox->Add( m_staticText13, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
m_LeftBox->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
|
||||||
|
wxString m_PadInZoneOptChoices[] = { _("Solid"), _("Thermal relief"), _("None") };
|
||||||
wxStaticBoxSizer* m_ThermalShapesParamsSizer;
|
int m_PadInZoneOptNChoices = sizeof( m_PadInZoneOptChoices ) / sizeof( wxString );
|
||||||
m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL );
|
m_PadInZoneOpt = new wxChoice( this, ID_M_PADINZONEOPT, wxDefaultPosition, wxDefaultSize, m_PadInZoneOptNChoices, m_PadInZoneOptChoices, 0 );
|
||||||
|
m_PadInZoneOpt->SetSelection( 0 );
|
||||||
m_AntipadSizeText = new wxStaticText( this, wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_LeftBox->Add( m_PadInZoneOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
m_AntipadSizeText->Wrap( -1 );
|
|
||||||
m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
wxStaticBoxSizer* m_ThermalShapesParamsSizer;
|
||||||
|
m_ThermalShapesParamsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Thermal Reliefs") ), wxVERTICAL );
|
||||||
m_AntipadSizeValue = new wxTextCtrl( this, wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") );
|
m_AntipadSizeText = new wxStaticText( this, wxID_ANY, _("Antipad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_AntipadSizeText->Wrap( -1 );
|
||||||
m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
m_ThermalShapesParamsSizer->Add( m_AntipadSizeText, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
m_CopperBridgeWidthText = new wxStaticText( this, wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_AntipadSizeValue = new wxTextCtrl( this, wxID_ANTIPAD_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_CopperBridgeWidthText->Wrap( -1 );
|
m_AntipadSizeValue->SetToolTip( _("Clearance between pads in the same net and filled areas.") );
|
||||||
m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
|
||||||
|
m_ThermalShapesParamsSizer->Add( m_AntipadSizeValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
m_CopperWidthValue = new wxTextCtrl( this, wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") );
|
m_CopperBridgeWidthText = new wxStaticText( this, wxID_ANY, _("Spoke width"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_CopperBridgeWidthText->Wrap( -1 );
|
||||||
m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
m_ThermalShapesParamsSizer->Add( m_CopperBridgeWidthText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_LeftBox->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 );
|
m_CopperWidthValue = new wxTextCtrl( this, wxID_COPPER_BRIDGE_VALUE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_CopperWidthValue->SetToolTip( _("Width of copper in thermal reliefs.") );
|
||||||
m_ExportableSetupSizer->Add( m_LeftBox, 0, wxEXPAND, 5 );
|
|
||||||
|
m_ThermalShapesParamsSizer->Add( m_CopperWidthValue, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
wxBoxSizer* m_MiddleBox;
|
|
||||||
m_MiddleBox = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
m_LeftBox->Add( m_ThermalShapesParamsSizer, 0, wxALL|wxEXPAND, 5 );
|
||||||
m_staticText171 = new wxStaticText( this, wxID_ANY, _("Priority level:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_staticText171->Wrap( -1 );
|
|
||||||
m_staticText171->SetToolTip( _("On each copper layer, zones are filled by priority order.\nSo when a zone is inside an other zone:\n* If its priority is highter: its outlines are removed from the other layer.\n* If its priority is equal: a DRC error is set.") );
|
m_ExportableSetupSizer->Add( m_LeftBox, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_MiddleBox->Add( m_staticText171, 0, wxRIGHT|wxLEFT, 5 );
|
wxBoxSizer* m_MiddleBox;
|
||||||
|
m_MiddleBox = new wxBoxSizer( wxVERTICAL );
|
||||||
m_PriorityLevelCtrl = new wxSpinCtrl( this, ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 );
|
|
||||||
m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
m_staticText171 = new wxStaticText( this, wxID_ANY, _("Priority level:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText171->Wrap( -1 );
|
||||||
m_staticText11 = new wxStaticText( this, wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticText171->SetToolTip( _("On each copper layer, zones are filled by priority order.\nSo when a zone is inside an other zone:\n* If its priority is highter: its outlines are removed from the other layer.\n* If its priority is equal: a DRC error is set.") );
|
||||||
m_staticText11->Wrap( -1 );
|
|
||||||
m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
m_MiddleBox->Add( m_staticText171, 0, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") };
|
m_PriorityLevelCtrl = new wxSpinCtrl( this, ID_M_PRIORITYLEVELCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 );
|
||||||
int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString );
|
m_MiddleBox->Add( m_PriorityLevelCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
m_FillModeCtrl = new wxChoice( this, ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 );
|
|
||||||
m_FillModeCtrl->SetSelection( 0 );
|
m_staticText11 = new wxStaticText( this, wxID_ANY, _("Fill mode:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
m_staticText11->Wrap( -1 );
|
||||||
|
m_MiddleBox->Add( m_staticText11, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
m_staticText12 = new wxStaticText( this, wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_staticText12->Wrap( -1 );
|
wxString m_FillModeCtrlChoices[] = { _("Polygon"), _("Segment") };
|
||||||
m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
int m_FillModeCtrlNChoices = sizeof( m_FillModeCtrlChoices ) / sizeof( wxString );
|
||||||
|
m_FillModeCtrl = new wxChoice( this, ID_M_FILLMODECTRL, wxDefaultPosition, wxDefaultSize, m_FillModeCtrlNChoices, m_FillModeCtrlChoices, 0 );
|
||||||
wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") };
|
m_FillModeCtrl->SetSelection( 0 );
|
||||||
int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString );
|
m_MiddleBox->Add( m_FillModeCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
m_ArcApproximationOpt = new wxChoice( this, ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 );
|
|
||||||
m_ArcApproximationOpt->SetSelection( 0 );
|
m_staticText12 = new wxStaticText( this, wxID_ANY, _("Segments / 360 deg:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
m_staticText12->Wrap( -1 );
|
||||||
|
m_MiddleBox->Add( m_staticText12, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 );
|
|
||||||
|
wxString m_ArcApproximationOptChoices[] = { _("16"), _("32") };
|
||||||
wxBoxSizer* bSizer81;
|
int m_ArcApproximationOptNChoices = sizeof( m_ArcApproximationOptChoices ) / sizeof( wxString );
|
||||||
bSizer81 = new wxBoxSizer( wxVERTICAL );
|
m_ArcApproximationOpt = new wxChoice( this, ID_M_ARCAPPROXIMATIONOPT, wxDefaultPosition, wxDefaultSize, m_ArcApproximationOptNChoices, m_ArcApproximationOptChoices, 0 );
|
||||||
|
m_ArcApproximationOpt->SetSelection( 0 );
|
||||||
m_staticText14 = new wxStaticText( this, wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_MiddleBox->Add( m_ArcApproximationOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
m_staticText14->Wrap( -1 );
|
|
||||||
bSizer81->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
|
||||||
|
m_ExportableSetupSizer->Add( m_MiddleBox, 0, wxEXPAND, 5 );
|
||||||
wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") };
|
|
||||||
int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString );
|
wxBoxSizer* bSizer81;
|
||||||
m_OrientEdgesOpt = new wxChoice( this, ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 );
|
bSizer81 = new wxBoxSizer( wxVERTICAL );
|
||||||
m_OrientEdgesOpt->SetSelection( 0 );
|
|
||||||
bSizer81->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
m_staticText14 = new wxStaticText( this, wxID_ANY, _("Outline slope:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText14->Wrap( -1 );
|
||||||
m_staticText15 = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
bSizer81->Add( m_staticText14, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
m_staticText15->Wrap( -1 );
|
|
||||||
bSizer81->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
wxString m_OrientEdgesOptChoices[] = { _("Arbitrary"), _("H, V, and 45 deg only") };
|
||||||
|
int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString );
|
||||||
wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") };
|
m_OrientEdgesOpt = new wxChoice( this, ID_M_ORIENTEDGESOPT, wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 0 );
|
||||||
int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString );
|
m_OrientEdgesOpt->SetSelection( 0 );
|
||||||
m_OutlineAppearanceCtrl = new wxChoice( this, ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 );
|
bSizer81->Add( m_OrientEdgesOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
m_OutlineAppearanceCtrl->SetSelection( 0 );
|
|
||||||
bSizer81->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
m_staticText15 = new wxStaticText( this, wxID_ANY, _("Outline style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText15->Wrap( -1 );
|
||||||
m_ExportableSetupSizer->Add( bSizer81, 0, wxEXPAND, 5 );
|
bSizer81->Add( m_staticText15, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
m_MainBoxSizer->Add( m_ExportableSetupSizer, 1, wxALL|wxEXPAND, 5 );
|
wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched"), _("Fully hatched") };
|
||||||
|
int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString );
|
||||||
wxBoxSizer* bSizer10;
|
m_OutlineAppearanceCtrl = new wxChoice( this, ID_M_OUTLINEAPPEARANCECTRL, wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 0 );
|
||||||
bSizer10 = new wxBoxSizer( wxHORIZONTAL );
|
m_OutlineAppearanceCtrl->SetSelection( 0 );
|
||||||
|
bSizer81->Add( m_OutlineAppearanceCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") );
|
|
||||||
|
m_ExportableSetupSizer->Add( bSizer81, 0, wxEXPAND, 5 );
|
||||||
bSizer10->Add( m_ExportSetupButton, 0, wxALL|wxEXPAND, 5 );
|
|
||||||
|
|
||||||
m_OkButton = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_MainBoxSizer->Add( m_ExportableSetupSizer, 1, wxALL|wxEXPAND, 5 );
|
||||||
m_OkButton->SetDefault();
|
|
||||||
bSizer10->Add( m_OkButton, 0, wxALL|wxEXPAND, 5 );
|
wxBoxSizer* bSizer10;
|
||||||
|
bSizer10 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
bSizer10->Add( m_ButtonCancel, 0, wxALL|wxEXPAND, 5 );
|
m_ExportSetupButton = new wxButton( this, wxID_BUTTON_EXPORT, _("Export Settings to Other Zones"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_ExportSetupButton->SetToolTip( _("Export this zone setup (excluding layer and net selection) to all other copper zones.") );
|
||||||
m_MainBoxSizer->Add( bSizer10, 0, wxALIGN_RIGHT|wxALL, 5 );
|
|
||||||
|
bSizer10->Add( m_ExportSetupButton, 0, wxALL|wxEXPAND, 5 );
|
||||||
this->SetSizer( m_MainBoxSizer );
|
|
||||||
this->Layout();
|
m_OkButton = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
}
|
m_OkButton->SetDefault();
|
||||||
|
bSizer10->Add( m_OkButton, 0, wxALL|wxEXPAND, 5 );
|
||||||
DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE()
|
|
||||||
{
|
m_ButtonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
}
|
bSizer10->Add( m_ButtonCancel, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
m_MainBoxSizer->Add( bSizer10, 0, wxALIGN_RIGHT|wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
this->SetSizer( m_MainBoxSizer );
|
||||||
|
this->Layout();
|
||||||
|
}
|
||||||
|
|
||||||
|
DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,131 +1,132 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Jun 30 2011)
|
// C++ code generated with wxFormBuilder (version Apr 11 2012)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef __DIALOG_COPPER_ZONES_BASE_H__
|
#ifndef __DIALOG_COPPER_ZONES_BASE_H__
|
||||||
#define __DIALOG_COPPER_ZONES_BASE_H__
|
#define __DIALOG_COPPER_ZONES_BASE_H__
|
||||||
|
|
||||||
#include <wx/artprov.h>
|
#include <wx/artprov.h>
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
#include <wx/string.h>
|
#include "dialog_shim.h"
|
||||||
#include <wx/stattext.h>
|
#include <wx/string.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/font.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/font.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/listbox.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/choice.h>
|
#include <wx/listbox.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/choice.h>
|
||||||
#include <wx/button.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/statbox.h>
|
#include <wx/button.h>
|
||||||
#include <wx/spinctrl.h>
|
#include <wx/statbox.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/spinctrl.h>
|
||||||
|
#include <wx/dialog.h>
|
||||||
///////////////////////////////////////////////////////////////////////////
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// Class DIALOG_COPPER_ZONE_BASE
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
/// Class DIALOG_COPPER_ZONE_BASE
|
||||||
class DIALOG_COPPER_ZONE_BASE : public wxDialog
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
{
|
class DIALOG_COPPER_ZONE_BASE : public DIALOG_SHIM
|
||||||
DECLARE_EVENT_TABLE()
|
{
|
||||||
private:
|
DECLARE_EVENT_TABLE()
|
||||||
|
private:
|
||||||
// Private event handlers
|
|
||||||
void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); }
|
// Private event handlers
|
||||||
void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); }
|
void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); }
|
||||||
void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); }
|
void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); }
|
||||||
void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); }
|
void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); }
|
||||||
void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); }
|
void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); }
|
||||||
void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); }
|
void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); }
|
||||||
void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); }
|
void _wxFB_OnPadsInZoneClick( wxCommandEvent& event ){ OnPadsInZoneClick( event ); }
|
||||||
void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); }
|
void _wxFB_ExportSetupToOtherCopperZones( wxCommandEvent& event ){ ExportSetupToOtherCopperZones( event ); }
|
||||||
void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); }
|
void _wxFB_OnButtonOkClick( wxCommandEvent& event ){ OnButtonOkClick( event ); }
|
||||||
|
void _wxFB_OnButtonCancelClick( wxCommandEvent& event ){ OnButtonCancelClick( event ); }
|
||||||
|
|
||||||
protected:
|
|
||||||
enum
|
protected:
|
||||||
{
|
enum
|
||||||
ID_DIALOG_COPPER_ZONE_BASE = 1000,
|
{
|
||||||
ID_NETNAME_SELECTION,
|
ID_DIALOG_COPPER_ZONE_BASE = 1000,
|
||||||
ID_M_NETDISPLAYOPTION,
|
ID_NETNAME_SELECTION,
|
||||||
ID_TEXTCTRL_NETNAMES_FILTER,
|
ID_M_NETDISPLAYOPTION,
|
||||||
wxID_APPLY_FILTERS,
|
ID_TEXTCTRL_NETNAMES_FILTER,
|
||||||
ID_CORNER_SMOOTHING,
|
wxID_APPLY_FILTERS,
|
||||||
ID_M_CORNERSMOOTHINGCTRL,
|
ID_CORNER_SMOOTHING,
|
||||||
ID_M_PADINZONEOPT,
|
ID_M_CORNERSMOOTHINGCTRL,
|
||||||
wxID_ANTIPAD_SIZE,
|
ID_M_PADINZONEOPT,
|
||||||
wxID_COPPER_BRIDGE_VALUE,
|
wxID_ANTIPAD_SIZE,
|
||||||
ID_M_PRIORITYLEVELCTRL,
|
wxID_COPPER_BRIDGE_VALUE,
|
||||||
ID_M_FILLMODECTRL,
|
ID_M_PRIORITYLEVELCTRL,
|
||||||
ID_M_ARCAPPROXIMATIONOPT,
|
ID_M_FILLMODECTRL,
|
||||||
ID_M_ORIENTEDGESOPT,
|
ID_M_ARCAPPROXIMATIONOPT,
|
||||||
ID_M_OUTLINEAPPEARANCECTRL,
|
ID_M_ORIENTEDGESOPT,
|
||||||
wxID_BUTTON_EXPORT,
|
ID_M_OUTLINEAPPEARANCECTRL,
|
||||||
};
|
wxID_BUTTON_EXPORT
|
||||||
|
};
|
||||||
wxBoxSizer* m_MainBoxSizer;
|
|
||||||
wxBoxSizer* m_layerSizer;
|
wxBoxSizer* m_MainBoxSizer;
|
||||||
wxStaticText* m_staticText17;
|
wxBoxSizer* m_layerSizer;
|
||||||
wxStaticText* m_staticText2;
|
wxStaticText* m_staticText17;
|
||||||
wxListBox* m_ListNetNameSelection;
|
wxStaticText* m_staticText2;
|
||||||
wxStaticText* m_staticText16;
|
wxListBox* m_ListNetNameSelection;
|
||||||
wxChoice* m_NetDisplayOption;
|
wxStaticText* m_staticText16;
|
||||||
wxStaticText* m_staticText5;
|
wxChoice* m_NetDisplayOption;
|
||||||
wxTextCtrl* m_DoNotShowNetNameFilter;
|
wxStaticText* m_staticText5;
|
||||||
wxStaticText* m_staticText51;
|
wxTextCtrl* m_DoNotShowNetNameFilter;
|
||||||
wxTextCtrl* m_ShowNetNameFilter;
|
wxStaticText* m_staticText51;
|
||||||
wxButton* m_buttonRunFilter;
|
wxTextCtrl* m_ShowNetNameFilter;
|
||||||
wxStaticText* m_ClearanceValueTitle;
|
wxButton* m_buttonRunFilter;
|
||||||
wxTextCtrl* m_ZoneClearanceCtrl;
|
wxStaticText* m_ClearanceValueTitle;
|
||||||
wxStaticText* m_MinThicknessValueTitle;
|
wxTextCtrl* m_ZoneClearanceCtrl;
|
||||||
wxTextCtrl* m_ZoneMinThicknessCtrl;
|
wxStaticText* m_MinThicknessValueTitle;
|
||||||
wxStaticText* m_staticText151;
|
wxTextCtrl* m_ZoneMinThicknessCtrl;
|
||||||
wxChoice* m_cornerSmoothingChoice;
|
wxStaticText* m_staticText151;
|
||||||
wxStaticText* m_cornerSmoothingTitle;
|
wxChoice* m_cornerSmoothingChoice;
|
||||||
wxTextCtrl* m_cornerSmoothingCtrl;
|
wxStaticText* m_cornerSmoothingTitle;
|
||||||
wxStaticText* m_staticText13;
|
wxTextCtrl* m_cornerSmoothingCtrl;
|
||||||
wxChoice* m_PadInZoneOpt;
|
wxStaticText* m_staticText13;
|
||||||
wxStaticText* m_AntipadSizeText;
|
wxChoice* m_PadInZoneOpt;
|
||||||
wxTextCtrl* m_AntipadSizeValue;
|
wxStaticText* m_AntipadSizeText;
|
||||||
wxStaticText* m_CopperBridgeWidthText;
|
wxTextCtrl* m_AntipadSizeValue;
|
||||||
wxTextCtrl* m_CopperWidthValue;
|
wxStaticText* m_CopperBridgeWidthText;
|
||||||
wxStaticText* m_staticText171;
|
wxTextCtrl* m_CopperWidthValue;
|
||||||
wxSpinCtrl* m_PriorityLevelCtrl;
|
wxStaticText* m_staticText171;
|
||||||
wxStaticText* m_staticText11;
|
wxSpinCtrl* m_PriorityLevelCtrl;
|
||||||
wxChoice* m_FillModeCtrl;
|
wxStaticText* m_staticText11;
|
||||||
wxStaticText* m_staticText12;
|
wxChoice* m_FillModeCtrl;
|
||||||
wxChoice* m_ArcApproximationOpt;
|
wxStaticText* m_staticText12;
|
||||||
wxStaticText* m_staticText14;
|
wxChoice* m_ArcApproximationOpt;
|
||||||
wxChoice* m_OrientEdgesOpt;
|
wxStaticText* m_staticText14;
|
||||||
wxStaticText* m_staticText15;
|
wxChoice* m_OrientEdgesOpt;
|
||||||
wxChoice* m_OutlineAppearanceCtrl;
|
wxStaticText* m_staticText15;
|
||||||
wxButton* m_ExportSetupButton;
|
wxChoice* m_OutlineAppearanceCtrl;
|
||||||
wxButton* m_OkButton;
|
wxButton* m_ExportSetupButton;
|
||||||
wxButton* m_ButtonCancel;
|
wxButton* m_OkButton;
|
||||||
|
wxButton* m_ButtonCancel;
|
||||||
// Virtual event handlers, overide them in your derived class
|
|
||||||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
|
// Virtual event handlers, overide them in your derived class
|
||||||
virtual void OnSize( wxSizeEvent& event ) { event.Skip(); }
|
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
|
||||||
virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnSize( wxSizeEvent& event ) { event.Skip(); }
|
||||||
virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnPadsInZoneClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnButtonOkClick( wxCommandEvent& event ) { event.Skip(); }
|
virtual void ExportSetupToOtherCopperZones( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnButtonOkClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnButtonCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
public:
|
|
||||||
|
public:
|
||||||
DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
|
||||||
~DIALOG_COPPER_ZONE_BASE();
|
DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID id = ID_DIALOG_COPPER_ZONE_BASE, const wxString& title = _("Zone Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,500 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
|
~DIALOG_COPPER_ZONE_BASE();
|
||||||
};
|
|
||||||
|
};
|
||||||
#endif //__DIALOG_COPPER_ZONES_BASE_H__
|
|
||||||
|
#endif //__DIALOG_COPPER_ZONES_BASE_H__
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,202 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2012 Marco Mattila <marcom99@gmail.com>
|
||||||
|
* Copyright (C) 2006 Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
|
||||||
|
* Copyright (C) 1992-2012 Kicad Developers, see AUTHORS.txt for contributors.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, you may find one here:
|
||||||
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||||
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||||
|
* or you may write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <fctsys.h>
|
||||||
|
#include <gr_basic.h>
|
||||||
|
#include <class_drawpanel.h>
|
||||||
|
#include <confirm.h>
|
||||||
|
#include <kicad_string.h>
|
||||||
|
#include <wxPcbStruct.h>
|
||||||
|
|
||||||
|
#include <class_board.h>
|
||||||
|
#include <class_module.h>
|
||||||
|
#include <class_marker_pcb.h>
|
||||||
|
|
||||||
|
#include <pcbnew.h>
|
||||||
|
#include <pcbnew_id.h>
|
||||||
|
#include <protos.h>
|
||||||
|
#include <dialog_find_base.h>
|
||||||
|
|
||||||
|
|
||||||
|
class DIALOG_FIND : public DIALOG_FIND_BASE
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DIALOG_FIND( PCB_BASE_FRAME* aParent );
|
||||||
|
|
||||||
|
private:
|
||||||
|
PCB_BASE_FRAME* parent;
|
||||||
|
|
||||||
|
int itemCount, markerCount;
|
||||||
|
static wxString prevSearchString;
|
||||||
|
static bool warpMouse;
|
||||||
|
|
||||||
|
void onButtonFindItemClick( wxCommandEvent& event );
|
||||||
|
void onButtonFindMarkerClick( wxCommandEvent& event );
|
||||||
|
void onButtonCloseClick( wxCommandEvent& event );
|
||||||
|
void onClose( wxCloseEvent& event );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Initialize static member variables
|
||||||
|
wxString DIALOG_FIND::prevSearchString;
|
||||||
|
bool DIALOG_FIND::warpMouse = true;
|
||||||
|
|
||||||
|
|
||||||
|
DIALOG_FIND::DIALOG_FIND( PCB_BASE_FRAME* aParent ) : DIALOG_FIND_BASE( aParent )
|
||||||
|
{
|
||||||
|
parent = aParent;
|
||||||
|
SetFocus();
|
||||||
|
GetSizer()->SetSizeHints( this );
|
||||||
|
|
||||||
|
m_SearchTextCtrl->AppendText( prevSearchString );
|
||||||
|
m_NoMouseWarpCheckBox->SetValue( !warpMouse );
|
||||||
|
|
||||||
|
itemCount = markerCount = 0;
|
||||||
|
|
||||||
|
Center();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DIALOG_FIND::onButtonCloseClick( wxCommandEvent& aEvent )
|
||||||
|
{
|
||||||
|
Close( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DIALOG_FIND::onButtonFindItemClick( wxCommandEvent& aEvent )
|
||||||
|
{
|
||||||
|
PCB_SCREEN* screen = (PCB_SCREEN*) ( parent->GetScreen() );
|
||||||
|
wxPoint pos;
|
||||||
|
BOARD_ITEM* foundItem = 0;
|
||||||
|
|
||||||
|
wxString searchString = m_SearchTextCtrl->GetValue();
|
||||||
|
|
||||||
|
if( !searchString.IsSameAs( prevSearchString, false ) )
|
||||||
|
{
|
||||||
|
itemCount = 0;
|
||||||
|
}
|
||||||
|
prevSearchString = searchString;
|
||||||
|
|
||||||
|
parent->GetCanvas()->GetViewStart( &screen->m_StartVisu.x, &screen->m_StartVisu.y );
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
for( MODULE* module = parent->GetBoard()->m_Modules; module; module = module->Next() )
|
||||||
|
{
|
||||||
|
if( WildCompareString( searchString, module->GetReference().GetData(), false ) )
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
|
||||||
|
if( count > itemCount )
|
||||||
|
{
|
||||||
|
foundItem = module;
|
||||||
|
pos = module->GetPosition();
|
||||||
|
itemCount++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( WildCompareString( searchString, module->m_Value->m_Text.GetData(), false ) )
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
|
||||||
|
if( count > itemCount )
|
||||||
|
{
|
||||||
|
foundItem = module;
|
||||||
|
pos = module->m_Pos;
|
||||||
|
itemCount++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString msg;
|
||||||
|
if( foundItem )
|
||||||
|
{
|
||||||
|
parent->SetCurItem( foundItem );
|
||||||
|
msg.Printf( _( "<%s> found" ), GetChars( searchString ) );
|
||||||
|
parent->SetStatusText( msg );
|
||||||
|
|
||||||
|
parent->CursorGoto( pos, !m_NoMouseWarpCheckBox->IsChecked() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
parent->SetStatusText( wxEmptyString );
|
||||||
|
msg.Printf( _( "<%s> not found" ), GetChars( searchString ) );
|
||||||
|
DisplayError( this, msg, 10 );
|
||||||
|
itemCount = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DIALOG_FIND::onButtonFindMarkerClick( wxCommandEvent& aEvent )
|
||||||
|
{
|
||||||
|
PCB_SCREEN* screen = (PCB_SCREEN*) ( parent->GetScreen() );
|
||||||
|
wxPoint pos;
|
||||||
|
BOARD_ITEM* foundItem = 0;
|
||||||
|
|
||||||
|
parent->GetCanvas()->GetViewStart( &screen->m_StartVisu.x, &screen->m_StartVisu.y );
|
||||||
|
|
||||||
|
MARKER_PCB* marker = parent->GetBoard()->GetMARKER( markerCount++ );
|
||||||
|
|
||||||
|
if( marker )
|
||||||
|
{
|
||||||
|
foundItem = marker;
|
||||||
|
pos = marker->GetPosition();
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString msg;
|
||||||
|
if( foundItem )
|
||||||
|
{
|
||||||
|
parent->SetCurItem( foundItem );
|
||||||
|
msg = _( "Marker found" );
|
||||||
|
parent->SetStatusText( msg );
|
||||||
|
|
||||||
|
parent->CursorGoto( pos, !m_NoMouseWarpCheckBox->IsChecked() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
parent->SetStatusText( wxEmptyString );
|
||||||
|
msg = _( "No marker found" );
|
||||||
|
DisplayError( this, msg, 10 );
|
||||||
|
markerCount = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DIALOG_FIND::onClose( wxCloseEvent& aEvent )
|
||||||
|
{
|
||||||
|
warpMouse = !m_NoMouseWarpCheckBox->IsChecked();
|
||||||
|
|
||||||
|
EndModal( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PCB_EDIT_FRAME::InstallFindFrame()
|
||||||
|
{
|
||||||
|
DIALOG_FIND dlg( this );
|
||||||
|
dlg.ShowModal();
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version Aug 24 2011)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "dialog_find_base.h"
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
DIALOG_FIND_BASE::DIALOG_FIND_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 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerMain;
|
||||||
|
bSizerMain = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizer3;
|
||||||
|
bSizer3 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Search for:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText1->Wrap( -1 );
|
||||||
|
bSizer3->Add( m_staticText1, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_SearchTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), 0 );
|
||||||
|
bSizer3->Add( m_SearchTextCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_NoMouseWarpCheckBox = new wxCheckBox( this, wxID_ANY, _("Do not warp mouse pointer"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bSizer3->Add( m_NoMouseWarpCheckBox, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
bSizerMain->Add( bSizer3, 1, 0, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizer4;
|
||||||
|
bSizer4 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_button1 = new wxButton( this, wxID_ANY, _("Find Item"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_button1->SetDefault();
|
||||||
|
bSizer4->Add( m_button1, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_button2 = new wxButton( this, wxID_ANY, _("Find Marker"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bSizer4->Add( m_button2, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
m_button3 = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
bSizer4->Add( m_button3, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
bSizerMain->Add( bSizer4, 0, 0, 5 );
|
||||||
|
|
||||||
|
this->SetSizer( bSizerMain );
|
||||||
|
this->Layout();
|
||||||
|
bSizerMain->Fit( this );
|
||||||
|
|
||||||
|
this->Centre( wxBOTH );
|
||||||
|
|
||||||
|
// Connect Events
|
||||||
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FIND_BASE::onClose ) );
|
||||||
|
m_button1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onButtonFindItemClick ), NULL, this );
|
||||||
|
m_button2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onButtonFindMarkerClick ), NULL, this );
|
||||||
|
m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onButtonCloseClick ), NULL, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
DIALOG_FIND_BASE::~DIALOG_FIND_BASE()
|
||||||
|
{
|
||||||
|
// Disconnect Events
|
||||||
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FIND_BASE::onClose ) );
|
||||||
|
m_button1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onButtonFindItemClick ), NULL, this );
|
||||||
|
m_button2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onButtonFindMarkerClick ), NULL, this );
|
||||||
|
m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onButtonCloseClick ), NULL, this );
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,681 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<wxFormBuilder_Project>
|
||||||
|
<FileVersion major="1" minor="10" />
|
||||||
|
<object class="Project" expanded="1">
|
||||||
|
<property name="class_decoration"></property>
|
||||||
|
<property name="code_generation">C++</property>
|
||||||
|
<property name="disconnect_events">1</property>
|
||||||
|
<property name="disconnect_mode">source_name</property>
|
||||||
|
<property name="disconnect_python_events">0</property>
|
||||||
|
<property name="embedded_files_path">res</property>
|
||||||
|
<property name="encoding">UTF-8</property>
|
||||||
|
<property name="event_generation">connect</property>
|
||||||
|
<property name="file">dialog_find_base</property>
|
||||||
|
<property name="first_id">1000</property>
|
||||||
|
<property name="help_provider">none</property>
|
||||||
|
<property name="internationalize">1</property>
|
||||||
|
<property name="name">dialog_find</property>
|
||||||
|
<property name="namespace"></property>
|
||||||
|
<property name="path">.</property>
|
||||||
|
<property name="precompiled_header"></property>
|
||||||
|
<property name="relative_path">1</property>
|
||||||
|
<property name="skip_python_events">1</property>
|
||||||
|
<property name="use_enum">0</property>
|
||||||
|
<property name="use_microsoft_bom">0</property>
|
||||||
|
<object class="Dialog" expanded="1">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_managed">0</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center">wxBOTH</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="event_handler">impl_virtual</property>
|
||||||
|
<property name="extra_style"></property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="layer"></property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="min_size"></property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">DIALOG_FIND_BASE</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="position"></property>
|
||||||
|
<property name="resize">Resizable</property>
|
||||||
|
<property name="row"></property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size">-1,-1</property>
|
||||||
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
|
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||||
|
<property name="title">Find</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="validator_data_type"></property>
|
||||||
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
|
<property name="validator_variable"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<event name="OnActivate"></event>
|
||||||
|
<event name="OnActivateApp"></event>
|
||||||
|
<event name="OnAuiFindManager"></event>
|
||||||
|
<event name="OnAuiPaneButton"></event>
|
||||||
|
<event name="OnAuiPaneClose"></event>
|
||||||
|
<event name="OnAuiPaneMaximize"></event>
|
||||||
|
<event name="OnAuiPaneRestore"></event>
|
||||||
|
<event name="OnAuiRender"></event>
|
||||||
|
<event name="OnChar"></event>
|
||||||
|
<event name="OnClose">onClose</event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnHibernate"></event>
|
||||||
|
<event name="OnIconize"></event>
|
||||||
|
<event name="OnIdle"></event>
|
||||||
|
<event name="OnInitDialog"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bSizerMain</property>
|
||||||
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag"></property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bSizer3</property>
|
||||||
|
<property name="orient">wxVERTICAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticText" expanded="1">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">Search for:</property>
|
||||||
|
<property name="layer"></property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="min_size"></property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_staticText1</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="position"></property>
|
||||||
|
<property name="resize">Resizable</property>
|
||||||
|
<property name="row"></property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass"></property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="validator_data_type"></property>
|
||||||
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
|
<property name="validator_variable"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<property name="wrap">-1</property>
|
||||||
|
<event name="OnChar"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL|wxEXPAND</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxTextCtrl" expanded="1">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="layer"></property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="maxlength">0</property>
|
||||||
|
<property name="min_size"></property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_SearchTextCtrl</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="position"></property>
|
||||||
|
<property name="resize">Resizable</property>
|
||||||
|
<property name="row"></property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size">200,-1</property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass"></property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="validator_data_type"></property>
|
||||||
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
|
<property name="validator_variable"></property>
|
||||||
|
<property name="value"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<event name="OnChar"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnText"></event>
|
||||||
|
<event name="OnTextEnter"></event>
|
||||||
|
<event name="OnTextMaxLen"></event>
|
||||||
|
<event name="OnTextURL"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxCheckBox" expanded="1">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="checked">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">Do not warp mouse pointer</property>
|
||||||
|
<property name="layer"></property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="min_size"></property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_NoMouseWarpCheckBox</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="position"></property>
|
||||||
|
<property name="resize">Resizable</property>
|
||||||
|
<property name="row"></property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass"></property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="validator_data_type"></property>
|
||||||
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
|
<property name="validator_variable"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<event name="OnChar"></event>
|
||||||
|
<event name="OnCheckBox"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag"></property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bSizer4</property>
|
||||||
|
<property name="orient">wxVERTICAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxButton" expanded="1">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default">1</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">Find Item</property>
|
||||||
|
<property name="layer"></property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="min_size"></property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_button1</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="position"></property>
|
||||||
|
<property name="resize">Resizable</property>
|
||||||
|
<property name="row"></property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass"></property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="validator_data_type"></property>
|
||||||
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
|
<property name="validator_variable"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<event name="OnButtonClick">onButtonFindItemClick</event>
|
||||||
|
<event name="OnChar"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxButton" expanded="1">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default">0</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">Find Marker</property>
|
||||||
|
<property name="layer"></property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="min_size"></property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_button2</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="position"></property>
|
||||||
|
<property name="resize">Resizable</property>
|
||||||
|
<property name="row"></property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass"></property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="validator_data_type"></property>
|
||||||
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
|
<property name="validator_variable"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<event name="OnButtonClick">onButtonFindMarkerClick</event>
|
||||||
|
<event name="OnChar"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxButton" expanded="1">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default">0</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_CANCEL</property>
|
||||||
|
<property name="label">Close</property>
|
||||||
|
<property name="layer"></property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="min_size"></property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_button3</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="position"></property>
|
||||||
|
<property name="resize">Resizable</property>
|
||||||
|
<property name="row"></property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass"></property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="validator_data_type"></property>
|
||||||
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
|
<property name="validator_variable"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<event name="OnButtonClick">onButtonCloseClick</event>
|
||||||
|
<event name="OnChar"></event>
|
||||||
|
<event name="OnEnterWindow"></event>
|
||||||
|
<event name="OnEraseBackground"></event>
|
||||||
|
<event name="OnKeyDown"></event>
|
||||||
|
<event name="OnKeyUp"></event>
|
||||||
|
<event name="OnKillFocus"></event>
|
||||||
|
<event name="OnLeaveWindow"></event>
|
||||||
|
<event name="OnLeftDClick"></event>
|
||||||
|
<event name="OnLeftDown"></event>
|
||||||
|
<event name="OnLeftUp"></event>
|
||||||
|
<event name="OnMiddleDClick"></event>
|
||||||
|
<event name="OnMiddleDown"></event>
|
||||||
|
<event name="OnMiddleUp"></event>
|
||||||
|
<event name="OnMotion"></event>
|
||||||
|
<event name="OnMouseEvents"></event>
|
||||||
|
<event name="OnMouseWheel"></event>
|
||||||
|
<event name="OnPaint"></event>
|
||||||
|
<event name="OnRightDClick"></event>
|
||||||
|
<event name="OnRightDown"></event>
|
||||||
|
<event name="OnRightUp"></event>
|
||||||
|
<event name="OnSetFocus"></event>
|
||||||
|
<event name="OnSize"></event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</wxFormBuilder_Project>
|
|
@ -0,0 +1,61 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version Aug 24 2011)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef __DIALOG_FIND_BASE_H__
|
||||||
|
#define __DIALOG_FIND_BASE_H__
|
||||||
|
|
||||||
|
#include <wx/artprov.h>
|
||||||
|
#include <wx/xrc/xmlres.h>
|
||||||
|
#include <wx/intl.h>
|
||||||
|
class DIALOG_SHIM;
|
||||||
|
|
||||||
|
#include "dialog_shim.h"
|
||||||
|
#include <wx/string.h>
|
||||||
|
#include <wx/stattext.h>
|
||||||
|
#include <wx/gdicmn.h>
|
||||||
|
#include <wx/font.h>
|
||||||
|
#include <wx/colour.h>
|
||||||
|
#include <wx/settings.h>
|
||||||
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/checkbox.h>
|
||||||
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/button.h>
|
||||||
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Class DIALOG_FIND_BASE
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
class DIALOG_FIND_BASE : public DIALOG_SHIM
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxStaticText* m_staticText1;
|
||||||
|
wxTextCtrl* m_SearchTextCtrl;
|
||||||
|
wxCheckBox* m_NoMouseWarpCheckBox;
|
||||||
|
wxButton* m_button1;
|
||||||
|
wxButton* m_button2;
|
||||||
|
wxButton* m_button3;
|
||||||
|
|
||||||
|
// Virtual event handlers, overide them in your derived class
|
||||||
|
virtual void onClose( wxCloseEvent& event ) { event.Skip(); }
|
||||||
|
virtual void onButtonFindItemClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void onButtonFindMarkerClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void onButtonCloseClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
DIALOG_FIND_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Find"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
|
~DIALOG_FIND_BASE();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //__DIALOG_FIND_BASE_H__
|
|
@ -0,0 +1,243 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||||
|
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, you may find one here:
|
||||||
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||||
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||||
|
* or you may write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file dialog_global_modules_fields_edition.cpp
|
||||||
|
* @brief global module fields edition.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <fctsys.h>
|
||||||
|
#include <common.h>
|
||||||
|
#include <class_drawpanel.h>
|
||||||
|
#include <wxBasePcbFrame.h>
|
||||||
|
#include <base_units.h>
|
||||||
|
#include <kicad_string.h>
|
||||||
|
|
||||||
|
#include <pcbnew.h>
|
||||||
|
#include <wxPcbStruct.h>
|
||||||
|
|
||||||
|
#include <class_board.h>
|
||||||
|
#include <class_module.h>
|
||||||
|
#include <class_text_mod.h>
|
||||||
|
#include <dialog_global_modules_fields_edition_base.h>
|
||||||
|
|
||||||
|
|
||||||
|
// The dialog to set options for global fields edition:
|
||||||
|
// optionas are:
|
||||||
|
// - edited fields (ref, value, others
|
||||||
|
// - the footprint filter, for selective edition
|
||||||
|
class DIALOG_GLOBAL_MODULES_FIELDS_EDITION : public DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE
|
||||||
|
{
|
||||||
|
PCB_EDIT_FRAME* m_parent;
|
||||||
|
BOARD_DESIGN_SETTINGS* m_brdSettings;
|
||||||
|
// Static variable to remember options, withing a session:
|
||||||
|
static bool m_refSelection;
|
||||||
|
static bool m_valueSelection;
|
||||||
|
static bool m_othersSelection;
|
||||||
|
static wxString m_filterString;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
DIALOG_GLOBAL_MODULES_FIELDS_EDITION( PCB_EDIT_FRAME* parent )
|
||||||
|
: DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE( parent )
|
||||||
|
{
|
||||||
|
m_parent = parent;
|
||||||
|
initDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void initDialog();
|
||||||
|
|
||||||
|
// event handlers
|
||||||
|
void OnOKClick( wxCommandEvent& event );
|
||||||
|
void OnCancelClick( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
EndModal( wxID_CANCEL );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
bool DIALOG_GLOBAL_MODULES_FIELDS_EDITION::m_refSelection = false;
|
||||||
|
bool DIALOG_GLOBAL_MODULES_FIELDS_EDITION::m_valueSelection = false;
|
||||||
|
bool DIALOG_GLOBAL_MODULES_FIELDS_EDITION::m_othersSelection = false;
|
||||||
|
wxString DIALOG_GLOBAL_MODULES_FIELDS_EDITION::m_filterString;
|
||||||
|
|
||||||
|
void DIALOG_GLOBAL_MODULES_FIELDS_EDITION::initDialog()
|
||||||
|
{
|
||||||
|
m_sdbSizerButtonsOK->SetDefault();
|
||||||
|
|
||||||
|
m_brdSettings = &m_parent->GetDesignSettings();
|
||||||
|
|
||||||
|
m_ReferenceOpt->SetValue(m_refSelection),
|
||||||
|
m_ValueOpt->SetValue(m_valueSelection),
|
||||||
|
m_OtherFields->SetValue(m_othersSelection);
|
||||||
|
m_ModuleFilter->SetValue(m_filterString);
|
||||||
|
m_SizeXunit->SetLabel( GetAbbreviatedUnitsLabel() );
|
||||||
|
m_SizeYunit->SetLabel( GetAbbreviatedUnitsLabel() );
|
||||||
|
m_Ticknessunit->SetLabel( GetAbbreviatedUnitsLabel() );
|
||||||
|
m_SizeX_Value->SetValue(
|
||||||
|
ReturnStringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.x ) );
|
||||||
|
m_SizeY_Value->SetValue(
|
||||||
|
ReturnStringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.y ) );
|
||||||
|
m_TicknessValue->SetValue(
|
||||||
|
ReturnStringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextWidth) );
|
||||||
|
|
||||||
|
Layout();
|
||||||
|
GetSizer()->SetSizeHints( this );
|
||||||
|
Centre();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DIALOG_GLOBAL_MODULES_FIELDS_EDITION::OnOKClick( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
m_refSelection = m_ReferenceOpt->GetValue();
|
||||||
|
m_valueSelection = m_ValueOpt->GetValue();
|
||||||
|
m_othersSelection = m_OtherFields->GetValue();
|
||||||
|
m_filterString = m_ModuleFilter->GetValue();
|
||||||
|
|
||||||
|
m_brdSettings->m_ModuleTextSize.x = ReturnValueFromTextCtrl( *m_SizeX_Value );
|
||||||
|
m_brdSettings->m_ModuleTextSize.y = ReturnValueFromTextCtrl( *m_SizeY_Value );
|
||||||
|
m_brdSettings->m_ModuleTextWidth = ReturnValueFromTextCtrl( *m_TicknessValue );
|
||||||
|
|
||||||
|
// clip m_ModuleTextWidth to the 1/4 of min size, to keep it always readable
|
||||||
|
int minsize = min( m_brdSettings->m_ModuleTextSize.x,
|
||||||
|
m_brdSettings->m_ModuleTextSize.y ) / 4;
|
||||||
|
if( m_brdSettings->m_ModuleTextWidth > minsize )
|
||||||
|
m_brdSettings->m_ModuleTextWidth = minsize;
|
||||||
|
|
||||||
|
m_parent->ResetModuleTextSizes( m_filterString, m_refSelection,
|
||||||
|
m_valueSelection, m_othersSelection );
|
||||||
|
EndModal( wxID_OK );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PCB_EDIT_FRAME::OnResetModuleTextSizes( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
DIALOG_GLOBAL_MODULES_FIELDS_EDITION dlg(this);
|
||||||
|
dlg.ShowModal();
|
||||||
|
|
||||||
|
m_canvas->Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PCB_BASE_FRAME::ResetModuleTextSizes( const wxString & aFilter, bool aRef,
|
||||||
|
bool aValue, bool aOthers )
|
||||||
|
{
|
||||||
|
MODULE* module;
|
||||||
|
BOARD_ITEM* boardItem;
|
||||||
|
TEXTE_MODULE* item;
|
||||||
|
ITEM_PICKER itemWrapper( NULL, UR_CHANGED );
|
||||||
|
PICKED_ITEMS_LIST undoItemList;
|
||||||
|
unsigned int ii;
|
||||||
|
|
||||||
|
// Prepare undo list
|
||||||
|
for( module = GetBoard()->m_Modules; module; module = module->Next() )
|
||||||
|
{
|
||||||
|
itemWrapper.SetItem( module );
|
||||||
|
|
||||||
|
if( ! aFilter.IsEmpty() )
|
||||||
|
{
|
||||||
|
if( ! WildCompareString( aFilter, module->GetLibRef(), false ) )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if( aRef )
|
||||||
|
{
|
||||||
|
item = module->m_Reference;
|
||||||
|
|
||||||
|
if( item->GetSize() != GetDesignSettings().m_ModuleTextSize ||
|
||||||
|
item->GetThickness() != GetDesignSettings().m_ModuleTextWidth )
|
||||||
|
{
|
||||||
|
undoItemList.PushItem( itemWrapper );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( aValue )
|
||||||
|
{
|
||||||
|
item = module->m_Value;
|
||||||
|
|
||||||
|
if( item->GetSize() != GetDesignSettings().m_ModuleTextSize ||
|
||||||
|
item->GetThickness() != GetDesignSettings().m_ModuleTextWidth )
|
||||||
|
{
|
||||||
|
undoItemList.PushItem( itemWrapper );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( aOthers )
|
||||||
|
{
|
||||||
|
// Go through all other module text fields
|
||||||
|
for( boardItem = module->m_Drawings; boardItem; boardItem = boardItem->Next() )
|
||||||
|
{
|
||||||
|
if( boardItem->Type() == PCB_MODULE_TEXT_T )
|
||||||
|
{
|
||||||
|
item = (TEXTE_MODULE*) boardItem;
|
||||||
|
|
||||||
|
if( item->GetSize() != GetDesignSettings().m_ModuleTextSize
|
||||||
|
|| item->GetThickness() != GetDesignSettings().m_ModuleTextWidth )
|
||||||
|
{
|
||||||
|
undoItemList.PushItem( itemWrapper );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Exit if there's nothing to do
|
||||||
|
if( !undoItemList.GetCount() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
SaveCopyInUndoList( undoItemList, UR_CHANGED );
|
||||||
|
|
||||||
|
// Apply changes to modules in the undo list
|
||||||
|
for( ii = 0; ii < undoItemList.GetCount(); ii++ )
|
||||||
|
{
|
||||||
|
module = (MODULE*) undoItemList.GetPickedItem( ii );
|
||||||
|
|
||||||
|
if( aRef )
|
||||||
|
{
|
||||||
|
module->m_Reference->SetThickness( GetDesignSettings().m_ModuleTextWidth );
|
||||||
|
module->m_Reference->SetSize( GetDesignSettings().m_ModuleTextSize );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( aValue )
|
||||||
|
{
|
||||||
|
module->m_Value->SetThickness( GetDesignSettings().m_ModuleTextWidth );
|
||||||
|
module->m_Value->SetSize( GetDesignSettings().m_ModuleTextSize );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( aOthers )
|
||||||
|
{
|
||||||
|
for( boardItem = module->m_Drawings; boardItem; boardItem = boardItem->Next() )
|
||||||
|
{
|
||||||
|
if( boardItem->Type() == PCB_MODULE_TEXT_T )
|
||||||
|
{
|
||||||
|
item = (TEXTE_MODULE*) boardItem;
|
||||||
|
item->SetThickness( GetDesignSettings().m_ModuleTextWidth );
|
||||||
|
item->SetSize( GetDesignSettings().m_ModuleTextSize );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
OnModify();
|
||||||
|
}
|
|
@ -0,0 +1,138 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version Apr 10 2012)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "dialog_global_modules_fields_edition_base.h"
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::DIALOG_GLOBAL_MODULES_FIELDS_EDITION_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 );
|
||||||
|
|
||||||
|
wxBoxSizer* bMainSizer;
|
||||||
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerUpper;
|
||||||
|
bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxBoxSizer* bLeftSizer;
|
||||||
|
bLeftSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbSizer1;
|
||||||
|
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields:") ), wxVERTICAL );
|
||||||
|
|
||||||
|
m_ReferenceOpt = new wxCheckBox( this, wxID_ANY, _("Modify reference"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
sbSizer1->Add( m_ReferenceOpt, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_ValueOpt = new wxCheckBox( this, wxID_ANY, _("Modify value"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
sbSizer1->Add( m_ValueOpt, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_OtherFields = new wxCheckBox( this, wxID_ANY, _("Modify other fields"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
sbSizer1->Add( m_OtherFields, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bLeftSizer->Add( sbSizer1, 1, wxEXPAND|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_staticTextFilter = new wxStaticText( this, wxID_ANY, _("Modules Filter:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextFilter->Wrap( -1 );
|
||||||
|
m_staticTextFilter->SetToolTip( _("A string to filter modules to edit.\nIf not void, footprint names should match this filter.\nA filter can be something like SM* (case insensitive)") );
|
||||||
|
|
||||||
|
bLeftSizer->Add( m_staticTextFilter, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_ModuleFilter = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_ModuleFilter->SetMinSize( wxSize( 180,-1 ) );
|
||||||
|
|
||||||
|
bLeftSizer->Add( m_ModuleFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerUpper->Add( bLeftSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bRightSizer;
|
||||||
|
bRightSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
wxStaticBoxSizer* sbSizerSettings;
|
||||||
|
sbSizerSettings = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Current Design Settings:") ), wxVERTICAL );
|
||||||
|
|
||||||
|
wxFlexGridSizer* fgSizerCurrSettings;
|
||||||
|
fgSizerCurrSettings = new wxFlexGridSizer( 3, 3, 0, 0 );
|
||||||
|
fgSizerCurrSettings->AddGrowableCol( 1 );
|
||||||
|
fgSizerCurrSettings->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizerCurrSettings->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
|
m_staticText3 = new wxStaticText( this, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText3->Wrap( -1 );
|
||||||
|
fgSizerCurrSettings->Add( m_staticText3, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||||
|
|
||||||
|
m_SizeX_Value = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerCurrSettings->Add( m_SizeX_Value, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_SizeXunit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_SizeXunit->Wrap( -1 );
|
||||||
|
fgSizerCurrSettings->Add( m_SizeXunit, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_staticText6 = new wxStaticText( this, wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText6->Wrap( -1 );
|
||||||
|
fgSizerCurrSettings->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT|wxALIGN_RIGHT, 5 );
|
||||||
|
|
||||||
|
m_SizeY_Value = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerCurrSettings->Add( m_SizeY_Value, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_SizeYunit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_SizeYunit->Wrap( -1 );
|
||||||
|
fgSizerCurrSettings->Add( m_SizeYunit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
m_staticText9 = new wxStaticText( this, wxID_ANY, _("Thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticText9->Wrap( -1 );
|
||||||
|
fgSizerCurrSettings->Add( m_staticText9, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||||
|
|
||||||
|
m_TicknessValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fgSizerCurrSettings->Add( m_TicknessValue, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_Ticknessunit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_Ticknessunit->Wrap( -1 );
|
||||||
|
fgSizerCurrSettings->Add( m_Ticknessunit, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
sbSizerSettings->Add( fgSizerCurrSettings, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bRightSizer->Add( sbSizerSettings, 0, wxEXPAND|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizerUpper->Add( bRightSizer, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bMainSizer->Add( bSizerUpper, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
m_sdbSizerButtons = new wxStdDialogButtonSizer();
|
||||||
|
m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
|
||||||
|
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK );
|
||||||
|
m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
|
||||||
|
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
|
||||||
|
m_sdbSizerButtons->Realize();
|
||||||
|
|
||||||
|
bMainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
this->SetSizer( bMainSizer );
|
||||||
|
this->Layout();
|
||||||
|
|
||||||
|
// Connect Events
|
||||||
|
m_sdbSizerButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::OnCancelClick ), NULL, this );
|
||||||
|
m_sdbSizerButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::OnOKClick ), NULL, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::~DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE()
|
||||||
|
{
|
||||||
|
// Disconnect Events
|
||||||
|
m_sdbSizerButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::OnCancelClick ), NULL, this );
|
||||||
|
m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::OnOKClick ), NULL, this );
|
||||||
|
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,71 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version Apr 10 2012)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef __DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE_H__
|
||||||
|
#define __DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE_H__
|
||||||
|
|
||||||
|
#include <wx/artprov.h>
|
||||||
|
#include <wx/xrc/xmlres.h>
|
||||||
|
#include <wx/intl.h>
|
||||||
|
#include "dialog_shim.h"
|
||||||
|
#include <wx/string.h>
|
||||||
|
#include <wx/checkbox.h>
|
||||||
|
#include <wx/gdicmn.h>
|
||||||
|
#include <wx/font.h>
|
||||||
|
#include <wx/colour.h>
|
||||||
|
#include <wx/settings.h>
|
||||||
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/statbox.h>
|
||||||
|
#include <wx/stattext.h>
|
||||||
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/statline.h>
|
||||||
|
#include <wx/button.h>
|
||||||
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Class DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
class DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE : public DIALOG_SHIM
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxCheckBox* m_ReferenceOpt;
|
||||||
|
wxCheckBox* m_ValueOpt;
|
||||||
|
wxCheckBox* m_OtherFields;
|
||||||
|
wxStaticText* m_staticTextFilter;
|
||||||
|
wxTextCtrl* m_ModuleFilter;
|
||||||
|
wxStaticText* m_staticText3;
|
||||||
|
wxTextCtrl* m_SizeX_Value;
|
||||||
|
wxStaticText* m_SizeXunit;
|
||||||
|
wxStaticText* m_staticText6;
|
||||||
|
wxTextCtrl* m_SizeY_Value;
|
||||||
|
wxStaticText* m_SizeYunit;
|
||||||
|
wxStaticText* m_staticText9;
|
||||||
|
wxTextCtrl* m_TicknessValue;
|
||||||
|
wxStaticText* m_Ticknessunit;
|
||||||
|
wxStaticLine* m_staticline1;
|
||||||
|
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||||
|
wxButton* m_sdbSizerButtonsOK;
|
||||||
|
wxButton* m_sdbSizerButtonsCancel;
|
||||||
|
|
||||||
|
// Virtual event handlers, overide them in your derived class
|
||||||
|
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnOKClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global Module Fields Edition"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 409,199 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
|
~DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //__DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE_H__
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
// C++ code generated with wxFormBuilder (version Apr 11 2012)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -9,12 +9,12 @@
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( DialogNonCopperZonesPropertiesBase, wxDialog )
|
BEGIN_EVENT_TABLE( DialogNonCopperZonesPropertiesBase, DIALOG_SHIM )
|
||||||
EVT_BUTTON( wxID_OK, DialogNonCopperZonesPropertiesBase::_wxFB_OnOkClick )
|
EVT_BUTTON( wxID_OK, DialogNonCopperZonesPropertiesBase::_wxFB_OnOkClick )
|
||||||
EVT_BUTTON( wxID_CANCEL, DialogNonCopperZonesPropertiesBase::_wxFB_OnCancelClick )
|
EVT_BUTTON( wxID_CANCEL, DialogNonCopperZonesPropertiesBase::_wxFB_OnCancelClick )
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( 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 );
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow
|
||||||
m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_ZoneMinThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
sbLeftSizer_->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
sbLeftSizer_->Add( m_ZoneMinThicknessCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_UpperSizer->Add( sbLeftSizer_, 0, 0, 5 );
|
m_UpperSizer->Add( sbLeftSizer_, 0, 0, 5 );
|
||||||
|
|
||||||
wxStaticBoxSizer* m_OutilinesBoxOpt;
|
wxStaticBoxSizer* m_OutilinesBoxOpt;
|
||||||
|
@ -57,6 +58,7 @@ DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow
|
||||||
m_OutlineAppearanceCtrl->SetSelection( 1 );
|
m_OutlineAppearanceCtrl->SetSelection( 1 );
|
||||||
m_OutilinesBoxOpt->Add( m_OutlineAppearanceCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
m_OutilinesBoxOpt->Add( m_OutlineAppearanceCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_UpperSizer->Add( m_OutilinesBoxOpt, 0, 0, 5 );
|
m_UpperSizer->Add( m_OutilinesBoxOpt, 0, 0, 5 );
|
||||||
|
|
||||||
wxBoxSizer* m_ButtonsSizer;
|
wxBoxSizer* m_ButtonsSizer;
|
||||||
|
@ -69,8 +71,10 @@ DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow
|
||||||
m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_ButtonsSizer->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
m_ButtonsSizer->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_UpperSizer->Add( m_ButtonsSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
|
m_UpperSizer->Add( m_ButtonsSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_MainSizer->Add( m_UpperSizer, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
|
m_MainSizer->Add( m_UpperSizer, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||||
|
|
||||||
m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Layer selection:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextLayerSelection = new wxStaticText( this, wxID_ANY, _("Layer selection:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
@ -80,6 +84,7 @@ DialogNonCopperZonesPropertiesBase::DialogNonCopperZonesPropertiesBase( wxWindow
|
||||||
m_LayerSelectionCtrl = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
m_LayerSelectionCtrl = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||||
m_MainSizer->Add( m_LayerSelectionCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
m_MainSizer->Add( m_LayerSelectionCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( m_MainSizer );
|
this->SetSizer( m_MainSizer );
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,15 +1,17 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
// C++ code generated with wxFormBuilder (version Apr 11 2012)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef __dialog_non_copper_zones_properties_base__
|
#ifndef __DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__
|
||||||
#define __dialog_non_copper_zones_properties_base__
|
#define __DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__
|
||||||
|
|
||||||
|
#include <wx/artprov.h>
|
||||||
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
#include "dialog_shim.h"
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/radiobox.h>
|
#include <wx/radiobox.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
|
@ -29,7 +31,7 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Class DialogNonCopperZonesPropertiesBase
|
/// Class DialogNonCopperZonesPropertiesBase
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
class DialogNonCopperZonesPropertiesBase : public wxDialog
|
class DialogNonCopperZonesPropertiesBase : public DIALOG_SHIM
|
||||||
{
|
{
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
private:
|
private:
|
||||||
|
@ -51,14 +53,15 @@ class DialogNonCopperZonesPropertiesBase : public wxDialog
|
||||||
wxListBox* m_LayerSelectionCtrl;
|
wxListBox* m_LayerSelectionCtrl;
|
||||||
|
|
||||||
// Virtual event handlers, overide them in your derived class
|
// Virtual event handlers, overide them in your derived class
|
||||||
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
|
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Non Copper Zones Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 416,287 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER );
|
|
||||||
|
DialogNonCopperZonesPropertiesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Non Copper Zones Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 416,287 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER );
|
||||||
~DialogNonCopperZonesPropertiesBase();
|
~DialogNonCopperZonesPropertiesBase();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__dialog_non_copper_zones_properties_base__
|
#endif //__DIALOG_NON_COPPER_ZONES_PROPERTIES_BASE_H__
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -56,36 +56,18 @@ struct ENET
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map< std::string, ENET > NET_MAP;
|
typedef std::map< std::string, ENET > NET_MAP;
|
||||||
|
typedef NET_MAP::const_iterator NET_MAP_CITER;
|
||||||
/*
|
|
||||||
#include
|
|
||||||
namespace boost {
|
|
||||||
namespace property_tree
|
|
||||||
{
|
|
||||||
template < class Key, class Data, class KeyCompare = std::less<Key> >
|
|
||||||
class basic_ptree;
|
|
||||||
|
|
||||||
typedef basic_ptree< std::string, std::string > ptree;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef boost::property_tree::ptree PTREE;
|
typedef boost::property_tree::ptree PTREE;
|
||||||
typedef const PTREE CPTREE;
|
typedef const PTREE CPTREE;
|
||||||
|
|
||||||
struct EWIRE;
|
class XPATH;
|
||||||
struct EVIA;
|
|
||||||
struct EROT;
|
|
||||||
struct EATTR;
|
|
||||||
struct ECIRCLE;
|
|
||||||
struct ETEXT;
|
|
||||||
struct ERECT;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class EAGLE_PLUGIN
|
* Class EAGLE_PLUGIN
|
||||||
* works with Eagle 6.x XML board files and footprints.
|
* works with Eagle 6.x XML board files and footprints to implement the
|
||||||
|
* Pcbnew PLUGIN API, or a portion of it.
|
||||||
*/
|
*/
|
||||||
class EAGLE_PLUGIN : public PLUGIN
|
class EAGLE_PLUGIN : public PLUGIN
|
||||||
{
|
{
|
||||||
|
@ -118,36 +100,46 @@ public:
|
||||||
|
|
||||||
//-----</PUBLIC PLUGIN API>-------------------------------------------------
|
//-----</PUBLIC PLUGIN API>-------------------------------------------------
|
||||||
|
|
||||||
typedef int BIU;
|
typedef int BIU;
|
||||||
|
|
||||||
EAGLE_PLUGIN();
|
EAGLE_PLUGIN();
|
||||||
~EAGLE_PLUGIN();
|
~EAGLE_PLUGIN();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
NET_MAP m_pads_to_nets;
|
XPATH* m_xpath; ///< keeps track of what we are working on within
|
||||||
|
///< XML document during a Load().
|
||||||
|
|
||||||
MODULE_MAP m_templates; ///< is part of a MODULE factory that operates
|
std::string m_err_path; ///< snapshot m_xpath contentx into here on exception
|
||||||
|
|
||||||
|
int m_hole_count; ///< generates unique module names from eagle "hole"s.
|
||||||
|
|
||||||
|
NET_MAP m_pads_to_nets; ///< net list
|
||||||
|
|
||||||
|
MODULE_MAP m_templates; ///< is part of a MODULE factory that operates
|
||||||
///< using copy construction.
|
///< using copy construction.
|
||||||
///< lookup key is libname.packagename
|
///< lookup key is libname.packagename
|
||||||
|
|
||||||
PROPERTIES* m_props; ///< passed via Save() or Load(), no ownership, may be NULL.
|
PROPERTIES* m_props; ///< passed via Save() or Load(), no ownership, may be NULL.
|
||||||
|
BOARD* m_board; ///< which BOARD is being worked on, no ownership here
|
||||||
BOARD* m_board; ///< which BOARD, no ownership here
|
double mm_per_biu; ///< how many mm in each BIU
|
||||||
double mm_per_biu; ///< how many mm in each BIU
|
double biu_per_mm; ///< how many bius in a mm
|
||||||
double biu_per_mm; ///< how many bius in a mm
|
|
||||||
|
|
||||||
/// initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed.
|
/// initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed.
|
||||||
void init( PROPERTIES* aProperties );
|
void init( PROPERTIES* aProperties );
|
||||||
|
|
||||||
|
/// Convert an Eagle distance to a KiCad distance.
|
||||||
int kicad( double d ) const;
|
int kicad( double d ) const;
|
||||||
int kicad_y( double y ) const { return -kicad( y ); }
|
int kicad_y( double y ) const { return -kicad( y ); }
|
||||||
int kicad_x( double x ) const { return kicad( x ); }
|
int kicad_x( double x ) const { return kicad( x ); }
|
||||||
|
|
||||||
|
/// create a font size (fontz) from an eagle font size scalar
|
||||||
wxSize kicad_fontz( double d ) const;
|
wxSize kicad_fontz( double d ) const;
|
||||||
|
|
||||||
|
/// Convert an Eagle layer to a KiCad layer.
|
||||||
static int kicad_layer( int aLayer );
|
static int kicad_layer( int aLayer );
|
||||||
|
|
||||||
|
/// Convert a KiCad distance to an Eagle distance.
|
||||||
double eagle( BIU d ) const { return mm_per_biu * d; }
|
double eagle( BIU d ) const { return mm_per_biu * d; }
|
||||||
double eagle_x( BIU x ) const { return eagle( x ); }
|
double eagle_x( BIU x ) const { return eagle( x ); }
|
||||||
double eagle_y( BIU y ) const { return eagle( y ); }
|
double eagle_y( BIU y ) const { return eagle( y ); }
|
||||||
|
@ -180,38 +172,15 @@ private:
|
||||||
|
|
||||||
// all these loadXXX() throw IO_ERROR or ptree_error exceptions:
|
// all these loadXXX() throw IO_ERROR or ptree_error exceptions:
|
||||||
|
|
||||||
void loadAllSections( CPTREE& aEagleBoard, const std::string& aXpath, bool aAppendToMe );
|
void loadAllSections( CPTREE& aDocument );
|
||||||
|
void loadLayerDefs( CPTREE& aLayers );
|
||||||
|
void loadPlain( CPTREE& aPlain );
|
||||||
|
void loadSignals( CPTREE& aSignals );
|
||||||
|
void loadLibraries( CPTREE& aLibs );
|
||||||
|
void loadElements( CPTREE& aElements );
|
||||||
|
|
||||||
void loadPlain( CPTREE& aPlain, const std::string& aXpath );
|
/// move the BOARD into the center of the page
|
||||||
|
void centerBoard();
|
||||||
void loadSignals( CPTREE& aSignals, const std::string& aXpath );
|
|
||||||
|
|
||||||
void loadLibraries( CPTREE& aLibs, const std::string& aXpath );
|
|
||||||
|
|
||||||
void loadElements( CPTREE& aElements, const std::string& aXpath );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function ewire
|
|
||||||
* converts a <wire>'s xml attributes to binary without additional conversion.
|
|
||||||
* @param aResult is an EWIRE to fill in with the <wire> data converted to binary.
|
|
||||||
*/
|
|
||||||
EWIRE ewire( CPTREE& aWire ) const;
|
|
||||||
|
|
||||||
EVIA evia( CPTREE& aVia ) const;
|
|
||||||
|
|
||||||
ECIRCLE ecircle( CPTREE& aCircle ) const;
|
|
||||||
ETEXT etext( CPTREE& aText ) const;
|
|
||||||
ERECT erect( CPTREE& aRect ) const;
|
|
||||||
|
|
||||||
EROT erot( const std::string& aRot ) const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function eattr
|
|
||||||
* parses an Eagle "attribute" element. Note that an attribute element
|
|
||||||
* is different than an XML element attribute. The attribute element is a
|
|
||||||
* full XML node in and of itself, and has attributes of its own. Blame Eagle.
|
|
||||||
*/
|
|
||||||
EATTR eattr( CPTREE& aAttribute ) const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function fmtDEG
|
* Function fmtDEG
|
||||||
|
@ -235,7 +204,6 @@ private:
|
||||||
void packageCircle( MODULE* aModule, CPTREE& aTree ) const;
|
void packageCircle( MODULE* aModule, CPTREE& aTree ) const;
|
||||||
void packageHole( MODULE* aModule, CPTREE& aTree ) const;
|
void packageHole( MODULE* aModule, CPTREE& aTree ) const;
|
||||||
void packageSMD( MODULE* aModule, CPTREE& aTree ) const;
|
void packageSMD( MODULE* aModule, CPTREE& aTree ) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // EAGLE_PLUGIN_H_
|
#endif // EAGLE_PLUGIN_H_
|
||||||
|
|
|
@ -81,6 +81,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
case ID_TOOLBARH_PCB_SELECT_LAYER:
|
case ID_TOOLBARH_PCB_SELECT_LAYER:
|
||||||
case ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR:
|
case ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR:
|
||||||
case ID_POPUP_PCB_ROTATE_TEXTEPCB:
|
case ID_POPUP_PCB_ROTATE_TEXTEPCB:
|
||||||
|
case ID_POPUP_PCB_FLIP_TEXTEPCB:
|
||||||
case ID_POPUP_PCB_EDIT_TEXTEPCB:
|
case ID_POPUP_PCB_EDIT_TEXTEPCB:
|
||||||
case ID_POPUP_PCB_EDIT_MIRE:
|
case ID_POPUP_PCB_EDIT_MIRE:
|
||||||
case ID_POPUP_PCB_ROTATE_TEXTMODULE:
|
case ID_POPUP_PCB_ROTATE_TEXTMODULE:
|
||||||
|
@ -286,7 +287,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_FIND_ITEMS:
|
case ID_FIND_ITEMS:
|
||||||
InstallFindFrame( pos, &dc );
|
InstallFindFrame();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_CLOSE_CURRENT_TOOL:
|
case ID_POPUP_CLOSE_CURRENT_TOOL:
|
||||||
|
@ -578,7 +579,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
// Remove filled areas in zone
|
// Remove filled areas in zone
|
||||||
ZONE_CONTAINER* zone_container = GetBoard()->GetArea( ii );
|
ZONE_CONTAINER* zone_container = GetBoard()->GetArea( ii );
|
||||||
zone_container->m_FilledPolysList.clear();
|
zone_container->ClearFilledPolysList();
|
||||||
}
|
}
|
||||||
|
|
||||||
SetCurItem( NULL ); // CurItem might be deleted by this command, clear the pointer
|
SetCurItem( NULL ); // CurItem might be deleted by this command, clear the pointer
|
||||||
|
@ -930,6 +931,11 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ID_POPUP_PCB_FLIP_TEXTEPCB:
|
||||||
|
FlipTextePcb( (TEXTE_PCB*) GetCurItem(), &dc );
|
||||||
|
m_canvas->MoveCursorToCrossHair();
|
||||||
|
break;
|
||||||
|
|
||||||
case ID_POPUP_PCB_DELETE_TEXTEPCB:
|
case ID_POPUP_PCB_DELETE_TEXTEPCB:
|
||||||
Delete_Texte_Pcb( (TEXTE_PCB*) GetCurItem(), &dc );
|
Delete_Texte_Pcb( (TEXTE_PCB*) GetCurItem(), &dc );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
|
@ -1078,14 +1084,6 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
Swap_Layers( event );
|
Swap_Layers( event );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES:
|
|
||||||
ResetModuleTextSizes( TEXT_is_REFERENCE, &dc );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES:
|
|
||||||
ResetModuleTextSizes( TEXT_is_VALUE, &dc );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_PCB_USER_GRID_SETUP:
|
case ID_PCB_USER_GRID_SETUP:
|
||||||
InstallGridFrame( pos );
|
InstallGridFrame( pos );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -216,7 +216,6 @@ TEXTE_PCB* PCB_EDIT_FRAME::Create_Texte_Pcb( wxDC* DC )
|
||||||
void PCB_EDIT_FRAME::Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
|
void PCB_EDIT_FRAME::Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
|
||||||
{
|
{
|
||||||
int angle = 900;
|
int angle = 900;
|
||||||
int drawmode = GR_XOR;
|
|
||||||
|
|
||||||
if( TextePcb == NULL )
|
if( TextePcb == NULL )
|
||||||
return;
|
return;
|
||||||
|
@ -228,13 +227,34 @@ void PCB_EDIT_FRAME::Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
|
||||||
NORMALIZE_ANGLE_POS( TextePcb->m_Orient );
|
NORMALIZE_ANGLE_POS( TextePcb->m_Orient );
|
||||||
|
|
||||||
/* Redraw text in new position. */
|
/* Redraw text in new position. */
|
||||||
TextePcb->Draw( m_canvas, DC, drawmode );
|
TextePcb->Draw( m_canvas, DC, GR_XOR );
|
||||||
TextePcb->DisplayInfo( this );
|
TextePcb->DisplayInfo( this );
|
||||||
|
|
||||||
if( TextePcb->GetFlags() == 0 ) // i.e. not edited, or moved
|
if( TextePcb->GetFlags() == 0 ) // i.e. not edited, or moved
|
||||||
SaveCopyInUndoList( TextePcb, UR_ROTATED, TextePcb->m_Pos );
|
SaveCopyInUndoList( TextePcb, UR_ROTATED, TextePcb->GetPosition() );
|
||||||
else // set flag edit, to show it was a complex command
|
else // set flag edit, to show it was a complex command
|
||||||
TextePcb->SetFlags( IN_EDIT );
|
TextePcb->SetFlags( IN_EDIT );
|
||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PCB_EDIT_FRAME::FlipTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC )
|
||||||
|
{
|
||||||
|
if( aTextePcb == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
|
aTextePcb->Draw( m_canvas, aDC, GR_XOR );
|
||||||
|
|
||||||
|
aTextePcb->Flip( aTextePcb->GetPosition() );
|
||||||
|
|
||||||
|
aTextePcb->Draw( m_canvas, aDC, GR_XOR );
|
||||||
|
aTextePcb->DisplayInfo( this );
|
||||||
|
|
||||||
|
if( aTextePcb->GetFlags() == 0 ) // i.e. not edited, or moved
|
||||||
|
SaveCopyInUndoList( aTextePcb, UR_FLIPPED, aTextePcb->GetPosition() );
|
||||||
|
else // set flag edit, to show it was a complex command
|
||||||
|
aTextePcb->SetFlags( IN_EDIT );
|
||||||
|
|
||||||
|
OnModify();
|
||||||
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
#include <macros.h>
|
#include <macros.h>
|
||||||
|
|
||||||
#include <pcbnew.h>
|
#include <pcbnew.h>
|
||||||
#include <protos.h>
|
#include <wxPcbStruct.h>
|
||||||
|
|
||||||
#include <class_board.h>
|
#include <class_board.h>
|
||||||
#include <class_module.h>
|
#include <class_module.h>
|
||||||
|
@ -356,107 +356,3 @@ void PCB_BASE_FRAME::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC )
|
||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
|
|
||||||
{
|
|
||||||
MODULE* module;
|
|
||||||
BOARD_ITEM* boardItem;
|
|
||||||
TEXTE_MODULE* item;
|
|
||||||
ITEM_PICKER itemWrapper( NULL, UR_CHANGED );
|
|
||||||
PICKED_ITEMS_LIST undoItemList;
|
|
||||||
unsigned int ii;
|
|
||||||
|
|
||||||
module = GetBoard()->m_Modules;
|
|
||||||
|
|
||||||
// Prepare undo list
|
|
||||||
while( module )
|
|
||||||
{
|
|
||||||
itemWrapper.SetItem( module );
|
|
||||||
|
|
||||||
switch( aType )
|
|
||||||
{
|
|
||||||
case TEXT_is_REFERENCE:
|
|
||||||
item = module->m_Reference;
|
|
||||||
|
|
||||||
if( item->GetSize() != GetDesignSettings().m_ModuleTextSize || item->GetThickness() != GetDesignSettings().m_ModuleTextWidth )
|
|
||||||
undoItemList.PushItem( itemWrapper );
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TEXT_is_VALUE:
|
|
||||||
item = module->m_Value;
|
|
||||||
|
|
||||||
if( item->GetSize() != GetDesignSettings().m_ModuleTextSize ||
|
|
||||||
item->GetThickness() != GetDesignSettings().m_ModuleTextWidth )
|
|
||||||
undoItemList.PushItem( itemWrapper );
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TEXT_is_DIVERS:
|
|
||||||
// Go through all other module text fields
|
|
||||||
for( boardItem = module->m_Drawings; boardItem; boardItem = boardItem->Next() )
|
|
||||||
{
|
|
||||||
if( boardItem->Type() == PCB_MODULE_TEXT_T )
|
|
||||||
{
|
|
||||||
item = (TEXTE_MODULE*) boardItem;
|
|
||||||
|
|
||||||
if( item->GetSize() != GetDesignSettings().m_ModuleTextSize
|
|
||||||
|| item->GetThickness() != GetDesignSettings().m_ModuleTextWidth )
|
|
||||||
{
|
|
||||||
undoItemList.PushItem( itemWrapper );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
module = module->Next();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Exit if there's nothing to do
|
|
||||||
if( !undoItemList.GetCount() )
|
|
||||||
return;
|
|
||||||
|
|
||||||
SaveCopyInUndoList( undoItemList, UR_CHANGED );
|
|
||||||
|
|
||||||
// Apply changes to modules in the undo list
|
|
||||||
for( ii = 0; ii < undoItemList.GetCount(); ii++ )
|
|
||||||
{
|
|
||||||
module = (MODULE*) undoItemList.GetPickedItem( ii );
|
|
||||||
|
|
||||||
switch( aType )
|
|
||||||
{
|
|
||||||
case TEXT_is_REFERENCE:
|
|
||||||
module->m_Reference->SetThickness( GetDesignSettings().m_ModuleTextWidth );
|
|
||||||
module->m_Reference->SetSize( GetDesignSettings().m_ModuleTextSize );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TEXT_is_VALUE:
|
|
||||||
module->m_Value->SetThickness( GetDesignSettings().m_ModuleTextWidth );
|
|
||||||
module->m_Value->SetSize( GetDesignSettings().m_ModuleTextSize );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TEXT_is_DIVERS:
|
|
||||||
for( boardItem = module->m_Drawings; boardItem; boardItem = boardItem->Next() )
|
|
||||||
{
|
|
||||||
if( boardItem->Type() == PCB_MODULE_TEXT_T )
|
|
||||||
{
|
|
||||||
item = (TEXTE_MODULE*) boardItem;
|
|
||||||
item->SetThickness( GetDesignSettings().m_ModuleTextWidth );
|
|
||||||
item->SetSize( GetDesignSettings().m_ModuleTextSize );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( aDC )
|
|
||||||
m_canvas->Refresh();
|
|
||||||
|
|
||||||
OnModify();
|
|
||||||
}
|
|
||||||
|
|
107
pcbnew/files.cpp
107
pcbnew/files.cpp
|
@ -90,39 +90,39 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event )
|
||||||
|
|
||||||
case ID_MENU_READ_LAST_SAVED_VERSION_BOARD:
|
case ID_MENU_READ_LAST_SAVED_VERSION_BOARD:
|
||||||
case ID_MENU_RECOVER_BOARD:
|
case ID_MENU_RECOVER_BOARD:
|
||||||
{
|
{
|
||||||
wxFileName fn;
|
wxFileName fn;
|
||||||
|
|
||||||
if( id == ID_MENU_RECOVER_BOARD )
|
if( id == ID_MENU_RECOVER_BOARD )
|
||||||
{
|
{
|
||||||
fn = wxFileName( wxEmptyString, saveFileName, PcbFileExtension );
|
fn = wxFileName( wxEmptyString, saveFileName, PcbFileExtension );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fn = GetScreen()->GetFileName();
|
fn = GetScreen()->GetFileName();
|
||||||
fn.SetExt( pcbBackupFileExtension );
|
fn.SetExt( pcbBackupFileExtension );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !fn.FileExists() )
|
if( !fn.FileExists() )
|
||||||
{
|
{
|
||||||
msg = _( "Recovery file " ) + fn.GetFullPath() + _( " not found." );
|
msg = _( "Recovery file " ) + fn.GetFullPath() + _( " not found." );
|
||||||
DisplayInfoMessage( this, msg );
|
DisplayInfoMessage( this, msg );
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
msg = _( "OK to load recovery file " ) + fn.GetFullPath();
|
|
||||||
|
|
||||||
if( !IsOK( this, msg ) )
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg = _( "OK to load recovery file " ) + fn.GetFullPath();
|
||||||
|
|
||||||
LoadOnePcbFile( fn.GetFullPath(), false );
|
if( !IsOK( this, msg ) )
|
||||||
fn.SetExt( PcbFileExtension );
|
break;
|
||||||
GetScreen()->SetFileName( fn.GetFullPath() );
|
}
|
||||||
UpdateTitle();
|
|
||||||
|
LoadOnePcbFile( fn.GetFullPath(), false );
|
||||||
|
fn.SetExt( PcbFileExtension );
|
||||||
|
GetScreen()->SetFileName( fn.GetFullPath() );
|
||||||
|
UpdateTitle();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case ID_APPEND_FILE:
|
case ID_APPEND_FILE:
|
||||||
LoadOnePcbFile( wxEmptyString, true );
|
LoadOnePcbFile( wxEmptyString, true );
|
||||||
|
@ -154,8 +154,6 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event )
|
||||||
bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend,
|
bool PCB_EDIT_FRAME::LoadOnePcbFile( const wxString& aFileName, bool aAppend,
|
||||||
bool aForceFileDialog )
|
bool aForceFileDialog )
|
||||||
{
|
{
|
||||||
wxString msg;
|
|
||||||
|
|
||||||
if( GetScreen()->IsModify() && !aAppend )
|
if( GetScreen()->IsModify() && !aAppend )
|
||||||
{
|
{
|
||||||
if( !IsOK( this, _( "The current board has been modified. Do you wish to discard \
|
if( !IsOK( this, _( "The current board has been modified. Do you wish to discard \
|
||||||
|
@ -170,12 +168,36 @@ the changes?" ) ) )
|
||||||
GetBoard()->m_Status_Pcb = 0;
|
GetBoard()->m_Status_Pcb = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileName fileName = aFileName;
|
wxFileName fileName = aFileName;
|
||||||
|
|
||||||
|
IO_MGR::PCB_FILE_T pluginType = IO_MGR::LEGACY;
|
||||||
|
|
||||||
|
// This is a subset of all PLUGINs which are trusted to be able to
|
||||||
|
// load a BOARD. Order is subject to change as KICAD plugin matures.
|
||||||
|
// User may occasionally use the wrong plugin to load a *.brd file,
|
||||||
|
// but eventually *.kicad_pcb will be more common than legacy *.brd files.
|
||||||
|
static const struct {
|
||||||
|
const wxString& filter;
|
||||||
|
IO_MGR::PCB_FILE_T pluginType;
|
||||||
|
} loaders[] = {
|
||||||
|
{ LegacyPcbFileWildcard, IO_MGR::LEGACY },
|
||||||
|
{ PcbFileWildcard, IO_MGR::KICAD },
|
||||||
|
{ EaglePcbFileWildcard, IO_MGR::EAGLE },
|
||||||
|
};
|
||||||
|
|
||||||
if( !fileName.IsOk() || !fileName.FileExists() || aForceFileDialog )
|
if( !fileName.IsOk() || !fileName.FileExists() || aForceFileDialog )
|
||||||
{
|
{
|
||||||
wxString name;
|
wxString name;
|
||||||
wxString path = wxGetCwd();
|
wxString path = wxGetCwd();
|
||||||
|
wxString fileFilters;
|
||||||
|
|
||||||
|
for( unsigned i=0; i<DIM( loaders ); ++i )
|
||||||
|
{
|
||||||
|
if( i > 0 )
|
||||||
|
fileFilters += wxChar( '|' );
|
||||||
|
|
||||||
|
fileFilters += wxGetTranslation( loaders[i].filter );
|
||||||
|
}
|
||||||
|
|
||||||
if( aForceFileDialog && fileName.FileExists() )
|
if( aForceFileDialog && fileName.FileExists() )
|
||||||
{
|
{
|
||||||
|
@ -183,7 +205,7 @@ the changes?" ) ) )
|
||||||
name = fileName.GetFullName();
|
name = fileName.GetFullName();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Open Board File" ), path, name, LegacyPcbFileWildcard,
|
wxFileDialog dlg( this, _( "Open Board File" ), path, name, fileFilters,
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
|
@ -191,10 +213,15 @@ the changes?" ) ) )
|
||||||
|
|
||||||
fileName = dlg.GetPath();
|
fileName = dlg.GetPath();
|
||||||
|
|
||||||
if( !fileName.HasExt() )
|
int chosenFilter = dlg.GetFilterIndex();
|
||||||
fileName.SetExt( PcbFileExtension );
|
pluginType = loaders[chosenFilter].pluginType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PLUGIN::RELEASER pi( IO_MGR::PluginFind( pluginType ) );
|
||||||
|
|
||||||
|
if( !fileName.HasExt() )
|
||||||
|
fileName.SetExt( pi->GetFileExtension() );
|
||||||
|
|
||||||
if( !aAppend )
|
if( !aAppend )
|
||||||
Clear_Pcb( false ); // pass false since we prompted above for a modified board
|
Clear_Pcb( false ); // pass false since we prompted above for a modified board
|
||||||
|
|
||||||
|
@ -223,14 +250,18 @@ the changes?" ) ) )
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
PROPERTIES props;
|
||||||
|
|
||||||
|
props["page_width"] = wxString::Format( wxT( "%d" ), GetPageSizeIU().x );
|
||||||
|
props["page_height"] = wxString::Format( wxT( "%d" ), GetPageSizeIU().y );
|
||||||
|
|
||||||
// load or append either:
|
// load or append either:
|
||||||
loadedBoard = IO_MGR::Load( IO_MGR::LEGACY, GetScreen()->GetFileName(),
|
loadedBoard = pi->Load( GetScreen()->GetFileName(), aAppend ? GetBoard() : NULL, &props );
|
||||||
aAppend ? GetBoard() : NULL,
|
|
||||||
NULL );
|
|
||||||
|
|
||||||
if( !aAppend )
|
if( !aAppend )
|
||||||
{
|
{
|
||||||
if( loadedBoard->GetFileFormatVersionAtLoad() < LEGACY_BOARD_FILE_VERSION )
|
if( pluginType == IO_MGR::LEGACY &&
|
||||||
|
loadedBoard->GetFileFormatVersionAtLoad() < LEGACY_BOARD_FILE_VERSION )
|
||||||
{
|
{
|
||||||
DisplayInfoMessage( this, _( "This file was created by an older \
|
DisplayInfoMessage( this, _( "This file was created by an older \
|
||||||
version of Pcbnew. It will be stored in the new file format when you save \
|
version of Pcbnew. It will be stored in the new file format when you save \
|
||||||
|
|
380
pcbnew/find.cpp
380
pcbnew/find.cpp
|
@ -1,380 +0,0 @@
|
||||||
/**
|
|
||||||
* @file pcbnew/find.cpp
|
|
||||||
* @brief Pcbnew find dialog box implementation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <fctsys.h>
|
|
||||||
#include <gr_basic.h>
|
|
||||||
#include <class_drawpanel.h>
|
|
||||||
#include <confirm.h>
|
|
||||||
#include <kicad_string.h>
|
|
||||||
#include <wxPcbStruct.h>
|
|
||||||
|
|
||||||
#include <class_board.h>
|
|
||||||
#include <class_module.h>
|
|
||||||
#include <class_marker_pcb.h>
|
|
||||||
|
|
||||||
#include <pcbnew.h>
|
|
||||||
#include <pcbnew_id.h>
|
|
||||||
#include <protos.h>
|
|
||||||
#include <find.h>
|
|
||||||
|
|
||||||
|
|
||||||
static wxString s_OldStringFound;
|
|
||||||
static int s_ItemCount, s_MarkerCount;
|
|
||||||
|
|
||||||
|
|
||||||
void PCB_EDIT_FRAME::InstallFindFrame( const wxPoint& pos, wxDC* DC )
|
|
||||||
{
|
|
||||||
WinEDA_PcbFindFrame* frame = new WinEDA_PcbFindFrame( this, DC, pos );
|
|
||||||
|
|
||||||
frame->ShowModal();
|
|
||||||
frame->Destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void WinEDA_PcbFindFrame::FindItem( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
PCB_SCREEN* screen = (PCB_SCREEN*) ( m_Parent->GetScreen() );
|
|
||||||
wxPoint locate_pos;
|
|
||||||
wxString msg;
|
|
||||||
bool FindMarker = false;
|
|
||||||
BOARD_ITEM* foundItem = 0;
|
|
||||||
|
|
||||||
switch( event.GetId() )
|
|
||||||
{
|
|
||||||
case ID_FIND_ITEM:
|
|
||||||
s_ItemCount = 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ID_FIND_MARKER:
|
|
||||||
s_MarkerCount = 0;
|
|
||||||
|
|
||||||
// fall thru
|
|
||||||
|
|
||||||
case ID_FIND_NEXT_MARKER:
|
|
||||||
FindMarker = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
s_OldStringFound = m_NewText->GetValue();
|
|
||||||
|
|
||||||
m_Parent->GetCanvas()->GetViewStart( &screen->m_StartVisu.x, &screen->m_StartVisu.y );
|
|
||||||
|
|
||||||
if( FindMarker )
|
|
||||||
{
|
|
||||||
MARKER_PCB* marker = m_Parent->GetBoard()->GetMARKER( s_MarkerCount++ );
|
|
||||||
|
|
||||||
if( marker )
|
|
||||||
{
|
|
||||||
foundItem = marker;
|
|
||||||
locate_pos = marker->GetPosition();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int StartCount = 0;
|
|
||||||
|
|
||||||
for( MODULE* module = m_Parent->GetBoard()->m_Modules; module; module = module->Next() )
|
|
||||||
{
|
|
||||||
if( WildCompareString( s_OldStringFound, module->GetReference().GetData(), false ) )
|
|
||||||
{
|
|
||||||
StartCount++;
|
|
||||||
|
|
||||||
if( StartCount > s_ItemCount )
|
|
||||||
{
|
|
||||||
foundItem = module;
|
|
||||||
locate_pos = module->GetPosition();
|
|
||||||
s_ItemCount++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( WildCompareString( s_OldStringFound, module->m_Value->m_Text.GetData(), false ) )
|
|
||||||
{
|
|
||||||
StartCount++;
|
|
||||||
|
|
||||||
if( StartCount > s_ItemCount )
|
|
||||||
{
|
|
||||||
foundItem = module;
|
|
||||||
locate_pos = module->m_Pos;
|
|
||||||
s_ItemCount++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( foundItem )
|
|
||||||
{
|
|
||||||
m_Parent->SetCurItem( foundItem );
|
|
||||||
|
|
||||||
if( FindMarker )
|
|
||||||
msg = _( "Marker found" );
|
|
||||||
else
|
|
||||||
msg.Printf( _( "<%s> Found" ), GetChars( s_OldStringFound ) );
|
|
||||||
|
|
||||||
m_Parent->SetStatusText( msg );
|
|
||||||
|
|
||||||
m_Parent->CursorGoto( locate_pos );
|
|
||||||
|
|
||||||
EndModal( 1 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_Parent->SetStatusText( wxEmptyString );
|
|
||||||
|
|
||||||
if( FindMarker )
|
|
||||||
msg = _( "Marker not found" );
|
|
||||||
else
|
|
||||||
msg.Printf( _( "<%s> Not Found" ), GetChars( s_OldStringFound ) );
|
|
||||||
|
|
||||||
DisplayError( this, msg, 10 );
|
|
||||||
EndModal( 0 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* WinEDA_PcbFindFrame type definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS( WinEDA_PcbFindFrame, wxDialog )
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* WinEDA_PcbFindFrame event table definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( WinEDA_PcbFindFrame, wxDialog )
|
|
||||||
|
|
||||||
////@begin WinEDA_PcbFindFrame event table entries
|
|
||||||
EVT_BUTTON( ID_FIND_ITEM, WinEDA_PcbFindFrame::OnFindItemClick )
|
|
||||||
EVT_BUTTON( ID_FIND_NEXT_ITEM, WinEDA_PcbFindFrame::OnFindNextItemClick )
|
|
||||||
EVT_BUTTON( ID_FIND_MARKER, WinEDA_PcbFindFrame::OnFindMarkerClick )
|
|
||||||
EVT_BUTTON( ID_FIND_NEXT_MARKER, WinEDA_PcbFindFrame::OnFindNextMarkerClick )
|
|
||||||
|
|
||||||
////@end WinEDA_PcbFindFrame event table entries
|
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
/*!
|
|
||||||
* WinEDA_PcbFindFrame constructors
|
|
||||||
*/
|
|
||||||
|
|
||||||
WinEDA_PcbFindFrame::WinEDA_PcbFindFrame()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
WinEDA_PcbFindFrame::WinEDA_PcbFindFrame( PCB_BASE_FRAME* parent,
|
|
||||||
wxDC* DC,
|
|
||||||
const wxPoint& pos,
|
|
||||||
wxWindowID id,
|
|
||||||
const wxString& caption,
|
|
||||||
const wxSize& size,
|
|
||||||
long style )
|
|
||||||
{
|
|
||||||
m_Parent = parent;
|
|
||||||
m_DC = DC;
|
|
||||||
|
|
||||||
Create( parent, id, caption, pos, size, style );
|
|
||||||
|
|
||||||
m_NewText->SetFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* WinEDA_PcbFindFrame creator
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool WinEDA_PcbFindFrame::Create( wxWindow* parent,
|
|
||||||
wxWindowID id,
|
|
||||||
const wxString& caption,
|
|
||||||
const wxPoint& pos,
|
|
||||||
const wxSize& size,
|
|
||||||
long style )
|
|
||||||
{
|
|
||||||
////@begin WinEDA_PcbFindFrame member initialisation
|
|
||||||
m_NewText = NULL;
|
|
||||||
|
|
||||||
////@end WinEDA_PcbFindFrame member initialisation
|
|
||||||
|
|
||||||
////@begin WinEDA_PcbFindFrame creation
|
|
||||||
SetExtraStyle( wxWS_EX_BLOCK_EVENTS );
|
|
||||||
wxDialog::Create( parent, id, caption, pos, size, style );
|
|
||||||
|
|
||||||
CreateControls();
|
|
||||||
|
|
||||||
if( GetSizer() )
|
|
||||||
{
|
|
||||||
GetSizer()->SetSizeHints( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
Centre();
|
|
||||||
|
|
||||||
////@end WinEDA_PcbFindFrame creation
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Control creation for WinEDA_PcbFindFrame
|
|
||||||
*/
|
|
||||||
|
|
||||||
void WinEDA_PcbFindFrame::CreateControls()
|
|
||||||
{
|
|
||||||
////@begin WinEDA_PcbFindFrame content construction
|
|
||||||
// Generated by DialogBlocks, 29/04/2009 15:15:49 (unregistered)
|
|
||||||
|
|
||||||
WinEDA_PcbFindFrame* itemDialog1 = this;
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
itemDialog1->SetSizer( itemBoxSizer2 );
|
|
||||||
|
|
||||||
wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1,
|
|
||||||
wxID_STATIC,
|
|
||||||
_( "Item to find:" ),
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxDefaultSize,
|
|
||||||
0 );
|
|
||||||
itemBoxSizer2->Add( itemStaticText3,
|
|
||||||
0,
|
|
||||||
wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
|
|
||||||
|
|
||||||
m_NewText = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T( "" ),
|
|
||||||
wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemBoxSizer2->Add( m_NewText, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
itemBoxSizer2->Add( itemBoxSizer5,
|
|
||||||
0,
|
|
||||||
wxALIGN_CENTER_HORIZONTAL | wxLEFT | wxRIGHT |
|
|
||||||
wxBOTTOM,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer6 = new wxBoxSizer( wxVERTICAL );
|
|
||||||
itemBoxSizer5->Add( itemBoxSizer6,
|
|
||||||
0,
|
|
||||||
wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
wxButton* itemButton7 =
|
|
||||||
new wxButton( itemDialog1, ID_FIND_ITEM, _( "Find Item" ),
|
|
||||||
wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemButton7->SetDefault();
|
|
||||||
itemBoxSizer6->Add( itemButton7, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
|
|
||||||
|
|
||||||
wxButton* itemButton8 =
|
|
||||||
new wxButton( itemDialog1, ID_FIND_NEXT_ITEM, _( "Find Next Item" ),
|
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
0 );
|
|
||||||
itemBoxSizer6->Add( itemButton8,
|
|
||||||
0,
|
|
||||||
wxGROW | wxLEFT | wxRIGHT | wxBOTTOM,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
wxBoxSizer* itemBoxSizer9 = new wxBoxSizer( wxVERTICAL );
|
|
||||||
itemBoxSizer5->Add( itemBoxSizer9,
|
|
||||||
0,
|
|
||||||
wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
wxButton* itemButton10 =
|
|
||||||
new wxButton( itemDialog1, ID_FIND_MARKER, _( "Find Marker" ),
|
|
||||||
wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
itemBoxSizer9->Add( itemButton10, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
|
|
||||||
|
|
||||||
wxButton* itemButton11 = new wxButton( itemDialog1,
|
|
||||||
ID_FIND_NEXT_MARKER,
|
|
||||||
_( "Find Next Marker" ),
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxDefaultSize,
|
|
||||||
0 );
|
|
||||||
itemBoxSizer9->Add( itemButton11,
|
|
||||||
0,
|
|
||||||
wxGROW | wxLEFT | wxRIGHT | wxBOTTOM,
|
|
||||||
5 );
|
|
||||||
|
|
||||||
////@end WinEDA_PcbFindFrame content construction
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Should we show tooltips?
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool WinEDA_PcbFindFrame::ShowToolTips()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Get bitmap resources
|
|
||||||
*/
|
|
||||||
|
|
||||||
wxBitmap WinEDA_PcbFindFrame::GetBitmapResource( const wxString& name )
|
|
||||||
{
|
|
||||||
// Bitmap retrieval
|
|
||||||
////@begin WinEDA_PcbFindFrame bitmap retrieval
|
|
||||||
wxUnusedVar( name );
|
|
||||||
return wxNullBitmap;
|
|
||||||
|
|
||||||
////@end WinEDA_PcbFindFrame bitmap retrieval
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Get icon resources
|
|
||||||
*/
|
|
||||||
|
|
||||||
wxIcon WinEDA_PcbFindFrame::GetIconResource( const wxString& name )
|
|
||||||
{
|
|
||||||
// Icon retrieval
|
|
||||||
////@begin WinEDA_PcbFindFrame icon retrieval
|
|
||||||
wxUnusedVar( name );
|
|
||||||
return wxNullIcon;
|
|
||||||
|
|
||||||
////@end WinEDA_PcbFindFrame icon retrieval
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FIND_ITEM
|
|
||||||
*/
|
|
||||||
|
|
||||||
void WinEDA_PcbFindFrame::OnFindItemClick( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
FindItem( event );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FIND_NEXT_ITEM
|
|
||||||
*/
|
|
||||||
|
|
||||||
void WinEDA_PcbFindFrame::OnFindNextItemClick( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
FindItem( event );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FIND_MARKER
|
|
||||||
*/
|
|
||||||
|
|
||||||
void WinEDA_PcbFindFrame::OnFindMarkerClick( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
FindItem( event );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FIND_NEXT_MARKER
|
|
||||||
*/
|
|
||||||
|
|
||||||
void WinEDA_PcbFindFrame::OnFindNextMarkerClick( wxCommandEvent& event )
|
|
||||||
{
|
|
||||||
FindItem( event );
|
|
||||||
}
|
|
126
pcbnew/find.h
126
pcbnew/find.h
|
@ -1,126 +0,0 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: find.h
|
|
||||||
// Purpose:
|
|
||||||
// Author: jean-pierre Charras
|
|
||||||
// Modified by:
|
|
||||||
// Created: 04/03/2006 13:58:04
|
|
||||||
// RCS-ID:
|
|
||||||
// Copyright: License GNU
|
|
||||||
// Licence:
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// Generated by DialogBlocks (unregistered), 04/03/2006 13:58:04
|
|
||||||
|
|
||||||
#ifndef _FIND_H_
|
|
||||||
#define _FIND_H_
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Includes
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin includes
|
|
||||||
////@end includes
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Forward declarations
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin forward declarations
|
|
||||||
////@end forward declarations
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Control identifiers
|
|
||||||
*/
|
|
||||||
|
|
||||||
////@begin control identifiers
|
|
||||||
#define ID_DIALOG 10000
|
|
||||||
#define ID_TEXTCTRL 10001
|
|
||||||
#define ID_FIND_ITEM 10002
|
|
||||||
#define ID_FIND_NEXT_ITEM 10003
|
|
||||||
#define ID_FIND_MARKER 10004
|
|
||||||
#define ID_FIND_NEXT_MARKER 10005
|
|
||||||
#define SYMBOL_WINEDA_PCBFINDFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
|
|
||||||
#define SYMBOL_WINEDA_PCBFINDFRAME_TITLE _("Find")
|
|
||||||
#define SYMBOL_WINEDA_PCBFINDFRAME_IDNAME ID_DIALOG
|
|
||||||
#define SYMBOL_WINEDA_PCBFINDFRAME_SIZE wxSize(400, 300)
|
|
||||||
#define SYMBOL_WINEDA_PCBFINDFRAME_POSITION wxDefaultPosition
|
|
||||||
////@end control identifiers
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Compatibility
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef wxCLOSE_BOX
|
|
||||||
#define wxCLOSE_BOX 0x1000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* WinEDA_PcbFindFrame class declaration
|
|
||||||
*/
|
|
||||||
|
|
||||||
class WinEDA_PcbFindFrame: public wxDialog
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS( WinEDA_PcbFindFrame )
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
|
|
||||||
public:
|
|
||||||
/// Constructors
|
|
||||||
WinEDA_PcbFindFrame( );
|
|
||||||
WinEDA_PcbFindFrame( PCB_BASE_FRAME* parent,
|
|
||||||
wxDC * DC, const wxPoint& pos = SYMBOL_WINEDA_PCBFINDFRAME_POSITION,
|
|
||||||
wxWindowID id = SYMBOL_WINEDA_PCBFINDFRAME_IDNAME,
|
|
||||||
const wxString& caption = SYMBOL_WINEDA_PCBFINDFRAME_TITLE,
|
|
||||||
const wxSize& size = SYMBOL_WINEDA_PCBFINDFRAME_SIZE,
|
|
||||||
long style = SYMBOL_WINEDA_PCBFINDFRAME_STYLE );
|
|
||||||
|
|
||||||
/// Creation
|
|
||||||
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PCBFINDFRAME_IDNAME,
|
|
||||||
const wxString& caption = SYMBOL_WINEDA_PCBFINDFRAME_TITLE,
|
|
||||||
const wxPoint& pos = SYMBOL_WINEDA_PCBFINDFRAME_POSITION,
|
|
||||||
const wxSize& size = SYMBOL_WINEDA_PCBFINDFRAME_SIZE,
|
|
||||||
long style = SYMBOL_WINEDA_PCBFINDFRAME_STYLE );
|
|
||||||
|
|
||||||
/// Creates the controls and sizers
|
|
||||||
void CreateControls();
|
|
||||||
|
|
||||||
////@begin WinEDA_PcbFindFrame event handler declarations
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FIND_ITEM
|
|
||||||
void OnFindItemClick( wxCommandEvent& event );
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FIND_NEXT_ITEM
|
|
||||||
void OnFindNextItemClick( wxCommandEvent& event );
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FIND_MARKER
|
|
||||||
void OnFindMarkerClick( wxCommandEvent& event );
|
|
||||||
|
|
||||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FIND_NEXT_MARKER
|
|
||||||
void OnFindNextMarkerClick( wxCommandEvent& event );
|
|
||||||
|
|
||||||
////@end WinEDA_PcbFindFrame event handler declarations
|
|
||||||
|
|
||||||
////@begin WinEDA_PcbFindFrame member function declarations
|
|
||||||
|
|
||||||
/// Retrieves bitmap resources
|
|
||||||
wxBitmap GetBitmapResource( const wxString& name );
|
|
||||||
|
|
||||||
/// Retrieves icon resources
|
|
||||||
wxIcon GetIconResource( const wxString& name );
|
|
||||||
////@end WinEDA_PcbFindFrame member function declarations
|
|
||||||
|
|
||||||
/// Should we show tooltips?
|
|
||||||
static bool ShowToolTips();
|
|
||||||
|
|
||||||
void FindItem(wxCommandEvent& event);
|
|
||||||
void FindMarker(wxCommandEvent& event);
|
|
||||||
|
|
||||||
////@begin WinEDA_PcbFindFrame member variables
|
|
||||||
wxTextCtrl* m_NewText;
|
|
||||||
////@end WinEDA_PcbFindFrame member variables
|
|
||||||
|
|
||||||
PCB_BASE_FRAME * m_Parent;
|
|
||||||
wxDC * m_DC;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// _FIND_H_
|
|
|
@ -67,7 +67,7 @@ static EDA_HOTKEY HkPlaceItem( wxT( "Place Item" ), HK_PLACE_ITEM, 'P' );
|
||||||
static EDA_HOTKEY HkAddMicroVia( wxT( "Add MicroVia" ), HK_ADD_MICROVIA, 'V' + GR_KB_CTRL );
|
static EDA_HOTKEY HkAddMicroVia( wxT( "Add MicroVia" ), HK_ADD_MICROVIA, 'V' + GR_KB_CTRL );
|
||||||
static EDA_HOTKEY HkEndTrack( wxT( "End Track" ), HK_END_TRACK, WXK_END );
|
static EDA_HOTKEY HkEndTrack( wxT( "End Track" ), HK_END_TRACK, WXK_END );
|
||||||
static EDA_HOTKEY HkEditBoardItem( wxT( "Edit Item" ), HK_EDIT_ITEM, 'E' );
|
static EDA_HOTKEY HkEditBoardItem( wxT( "Edit Item" ), HK_EDIT_ITEM, 'E' );
|
||||||
static EDA_HOTKEY HkFlipFootprint( wxT( "Flip Footprint" ), HK_FLIP_FOOTPRINT, 'F' );
|
static EDA_HOTKEY HkFlipItem( wxT( "Flip Item" ), HK_FLIP_ITEM, 'F' );
|
||||||
static EDA_HOTKEY HkRotateItem( wxT( "Rotate Item" ), HK_ROTATE_ITEM, 'R' );
|
static EDA_HOTKEY HkRotateItem( wxT( "Rotate Item" ), HK_ROTATE_ITEM, 'R' );
|
||||||
static EDA_HOTKEY HkMoveItem( wxT( "Move Item" ), HK_MOVE_ITEM, 'M' );
|
static EDA_HOTKEY HkMoveItem( wxT( "Move Item" ), HK_MOVE_ITEM, 'M' );
|
||||||
static EDA_HOTKEY HkDragFootprint( wxT( "Drag Footprint" ), HK_DRAG_ITEM, 'G' );
|
static EDA_HOTKEY HkDragFootprint( wxT( "Drag Footprint" ), HK_DRAG_ITEM, 'G' );
|
||||||
|
@ -78,7 +78,7 @@ static EDA_HOTKEY HkLock_Unlock_Footprint( wxT( "Lock/Unlock Footprint" ),
|
||||||
static EDA_HOTKEY HkDelete( wxT( "Delete Track or Footprint" ), HK_DELETE, WXK_DELETE );
|
static EDA_HOTKEY HkDelete( wxT( "Delete Track or Footprint" ), HK_DELETE, WXK_DELETE );
|
||||||
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
|
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
|
||||||
HK_RESET_LOCAL_COORD, ' ' );
|
HK_RESET_LOCAL_COORD, ' ' );
|
||||||
static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"),
|
static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"),
|
||||||
HK_SWITCH_HIGHCONTRAST_MODE,'H');
|
HK_SWITCH_HIGHCONTRAST_MODE,'H');
|
||||||
/* Fit on Screen */
|
/* Fit on Screen */
|
||||||
#if !defined( __WXMAC__ )
|
#if !defined( __WXMAC__ )
|
||||||
|
@ -210,8 +210,8 @@ EDA_HOTKEY* board_edit_Hotkey_List[] =
|
||||||
&HkSwitchTrackPosture,
|
&HkSwitchTrackPosture,
|
||||||
&HkDragTrackKeepSlope,
|
&HkDragTrackKeepSlope,
|
||||||
&HkPlaceItem,
|
&HkPlaceItem,
|
||||||
&HkEndTrack, &HkMoveItem,
|
&HkEndTrack, &HkMoveItem, &HkFlipItem,
|
||||||
&HkFlipFootprint, &HkRotateItem, &HkDragFootprint,
|
&HkRotateItem, &HkDragFootprint,
|
||||||
&HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile,
|
&HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile,
|
||||||
&HkLoadfile, &HkFindItem, &HkEditBoardItem,
|
&HkLoadfile, &HkFindItem, &HkEditBoardItem,
|
||||||
&HkSwitch2CopperLayer, &HkSwitch2InnerLayer1,
|
&HkSwitch2CopperLayer, &HkSwitch2InnerLayer1,
|
||||||
|
|
|
@ -14,9 +14,9 @@ enum hotkey_id_commnand {
|
||||||
HK_DELETE = HK_COMMON_END,
|
HK_DELETE = HK_COMMON_END,
|
||||||
HK_BACK_SPACE,
|
HK_BACK_SPACE,
|
||||||
HK_ROTATE_ITEM,
|
HK_ROTATE_ITEM,
|
||||||
|
HK_FLIP_ITEM,
|
||||||
HK_MOVE_ITEM,
|
HK_MOVE_ITEM,
|
||||||
HK_DRAG_ITEM,
|
HK_DRAG_ITEM,
|
||||||
HK_FLIP_FOOTPRINT,
|
|
||||||
HK_GET_AND_MOVE_FOOTPRINT,
|
HK_GET_AND_MOVE_FOOTPRINT,
|
||||||
HK_LOCK_UNLOCK_FOOTPRINT,
|
HK_LOCK_UNLOCK_FOOTPRINT,
|
||||||
HK_ADD_NEW_TRACK,
|
HK_ADD_NEW_TRACK,
|
||||||
|
|
|
@ -624,9 +624,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
|
||||||
OnHotkeyRotateItem( HK_ROTATE_ITEM );
|
OnHotkeyRotateItem( HK_ROTATE_ITEM );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_FLIP_FOOTPRINT: // move to other side
|
case HK_FLIP_ITEM:
|
||||||
OnHotkeyRotateItem( HK_FLIP_FOOTPRINT );
|
OnHotkeyRotateItem( HK_FLIP_ITEM );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_SWITCH_HIGHCONTRAST_MODE: // switch to high contrast mode and refresh the canvas
|
case HK_SWITCH_HIGHCONTRAST_MODE: // switch to high contrast mode and refresh the canvas
|
||||||
DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay;
|
DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay;
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
|
@ -1002,7 +1003,7 @@ bool PCB_EDIT_FRAME::OnHotkeyRotateItem( int aIdCommand )
|
||||||
if( aIdCommand == HK_ROTATE_ITEM ) // Rotation
|
if( aIdCommand == HK_ROTATE_ITEM ) // Rotation
|
||||||
evt_type = ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE;
|
evt_type = ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE;
|
||||||
|
|
||||||
if( aIdCommand == HK_FLIP_FOOTPRINT ) // move to other side
|
if( aIdCommand == HK_FLIP_ITEM ) // move to other side
|
||||||
evt_type = ID_POPUP_PCB_CHANGE_SIDE_MODULE;
|
evt_type = ID_POPUP_PCB_CHANGE_SIDE_MODULE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1010,6 +1011,8 @@ bool PCB_EDIT_FRAME::OnHotkeyRotateItem( int aIdCommand )
|
||||||
case PCB_TEXT_T:
|
case PCB_TEXT_T:
|
||||||
if( aIdCommand == HK_ROTATE_ITEM ) // Rotation
|
if( aIdCommand == HK_ROTATE_ITEM ) // Rotation
|
||||||
evt_type = ID_POPUP_PCB_ROTATE_TEXTEPCB;
|
evt_type = ID_POPUP_PCB_ROTATE_TEXTEPCB;
|
||||||
|
else if( aIdCommand == HK_FLIP_ITEM )
|
||||||
|
evt_type = ID_POPUP_PCB_FLIP_TEXTEPCB;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -970,7 +970,7 @@ void PCB_IO::format( ZONE_CONTAINER* aZone, OUTPUTFORMATTER* aFormatter, int aNe
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save the PolysList
|
// Save the PolysList
|
||||||
const std::vector< CPolyPt >& fv = aZone->m_FilledPolysList;
|
const std::vector< CPolyPt >& fv = aZone->GetFilledPolysList();
|
||||||
|
|
||||||
if( fv.size() )
|
if( fv.size() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -2258,6 +2258,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER()
|
||||||
else if( TESTLINE( "$POLYSCORNERS" ) )
|
else if( TESTLINE( "$POLYSCORNERS" ) )
|
||||||
{
|
{
|
||||||
// Read the PolysList (polygons used for fill areas in the zone)
|
// Read the PolysList (polygons used for fill areas in the zone)
|
||||||
|
std::vector<CPolyPt> polysList;
|
||||||
|
|
||||||
while( READLINE( m_reader ) )
|
while( READLINE( m_reader ) )
|
||||||
{
|
{
|
||||||
|
@ -2273,8 +2274,9 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER()
|
||||||
bool end_contour = intParse( data, &data ); // end_countour was a bool when file saved, so '0' or '1' here
|
bool end_contour = intParse( data, &data ); // end_countour was a bool when file saved, so '0' or '1' here
|
||||||
int utility = intParse( data );
|
int utility = intParse( data );
|
||||||
|
|
||||||
zc->m_FilledPolysList.push_back( CPolyPt( x, y, end_contour, utility ) );
|
polysList.push_back( CPolyPt( x, y, end_contour, utility ) );
|
||||||
}
|
}
|
||||||
|
zc->AddFilledPolysList( polysList );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( TESTLINE( "$FILLSEGMENTS" ) )
|
else if( TESTLINE( "$FILLSEGMENTS" ) )
|
||||||
|
@ -3569,7 +3571,7 @@ void LEGACY_PLUGIN::saveZONE_CONTAINER( const ZONE_CONTAINER* me ) const
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save the PolysList
|
// Save the PolysList
|
||||||
const CPOLY_PTS& fv = me->m_FilledPolysList;
|
const CPOLY_PTS& fv = me->GetFilledPolysList();
|
||||||
if( fv.size() )
|
if( fv.size() )
|
||||||
{
|
{
|
||||||
fprintf( m_fp, "$POLYSCORNERS\n" );
|
fprintf( m_fp, "$POLYSCORNERS\n" );
|
||||||
|
|
|
@ -295,15 +295,9 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
||||||
KiBitmap( swap_layer_xpm ) );
|
KiBitmap( swap_layer_xpm ) );
|
||||||
|
|
||||||
// Reset module reference sizes
|
// Reset module reference sizes
|
||||||
AddMenuItem( editMenu, ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES,
|
AddMenuItem( editMenu, ID_MENU_PCB_RESET_TEXTMODULE_FIELDS_SIZES,
|
||||||
_( "Reset Module &Reference Sizes" ),
|
_( "&Reset Module Field Sizes" ),
|
||||||
_( "Reset text size and width of all module references to current defaults" ),
|
_( "Reset text size and width of all module fields to current defaults" ),
|
||||||
KiBitmap( reset_text_xpm ) );
|
|
||||||
|
|
||||||
// Reset module value sizes
|
|
||||||
AddMenuItem( editMenu, ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES,
|
|
||||||
_( "Reset Module &Value Sizes" ),
|
|
||||||
_( "Reset text size and width of all module values to current defaults" ),
|
|
||||||
KiBitmap( reset_text_xpm ) );
|
KiBitmap( reset_text_xpm ) );
|
||||||
|
|
||||||
/** Create View menu **/
|
/** Create View menu **/
|
||||||
|
|
|
@ -631,7 +631,7 @@ void PCB_EDIT_FRAME::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu*
|
||||||
AddMenuItem( zones_menu, ID_POPUP_PCB_FILL_ZONE, _( "Fill Zone" ),
|
AddMenuItem( zones_menu, ID_POPUP_PCB_FILL_ZONE, _( "Fill Zone" ),
|
||||||
KiBitmap( fill_zone_xpm ) );
|
KiBitmap( fill_zone_xpm ) );
|
||||||
|
|
||||||
if( edge_zone->m_FilledPolysList.size() > 0 )
|
if( edge_zone->GetFilledPolysList().size() > 0 )
|
||||||
{
|
{
|
||||||
AddMenuItem( zones_menu, ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_CURRENT_ZONE,
|
AddMenuItem( zones_menu, ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_CURRENT_ZONE,
|
||||||
_( "Remove Filled Areas in Zone" ), KiBitmap( zone_unfill_xpm ) );
|
_( "Remove Filled Areas in Zone" ), KiBitmap( zone_unfill_xpm ) );
|
||||||
|
@ -685,7 +685,7 @@ void PCB_EDIT_FRAME::createPopUpMenuForFootprints( MODULE* aModule, wxMenu* menu
|
||||||
msg, KiBitmap( rotate_module_pos_xpm ) );
|
msg, KiBitmap( rotate_module_pos_xpm ) );
|
||||||
AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE,
|
AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE,
|
||||||
_( "Rotate -" ), KiBitmap( rotate_module_neg_xpm ) );
|
_( "Rotate -" ), KiBitmap( rotate_module_neg_xpm ) );
|
||||||
msg = AddHotkeyName( _( "Flip" ), g_Board_Editor_Hokeys_Descr, HK_FLIP_FOOTPRINT );
|
msg = AddHotkeyName( _( "Flip" ), g_Board_Editor_Hokeys_Descr, HK_FLIP_ITEM );
|
||||||
AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_CHANGE_SIDE_MODULE,
|
AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_CHANGE_SIDE_MODULE,
|
||||||
msg, KiBitmap( invert_module_xpm ) );
|
msg, KiBitmap( invert_module_xpm ) );
|
||||||
|
|
||||||
|
@ -839,6 +839,8 @@ void PCB_EDIT_FRAME::createPopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu )
|
||||||
|
|
||||||
msg = AddHotkeyName( _( "Rotate" ), g_Board_Editor_Hokeys_Descr, HK_ROTATE_ITEM );
|
msg = AddHotkeyName( _( "Rotate" ), g_Board_Editor_Hokeys_Descr, HK_ROTATE_ITEM );
|
||||||
AddMenuItem( sub_menu_Text, ID_POPUP_PCB_ROTATE_TEXTEPCB, msg, KiBitmap( rotate_ccw_xpm ) );
|
AddMenuItem( sub_menu_Text, ID_POPUP_PCB_ROTATE_TEXTEPCB, msg, KiBitmap( rotate_ccw_xpm ) );
|
||||||
|
msg = AddHotkeyName( _( "Flip" ), g_Board_Editor_Hokeys_Descr, HK_FLIP_ITEM );
|
||||||
|
AddMenuItem( sub_menu_Text, ID_POPUP_PCB_FLIP_TEXTEPCB, msg, KiBitmap( invert_module_xpm ) );
|
||||||
msg = AddHotkeyName( _( "Edit" ), g_Board_Editor_Hokeys_Descr, HK_EDIT_ITEM );
|
msg = AddHotkeyName( _( "Edit" ), g_Board_Editor_Hokeys_Descr, HK_EDIT_ITEM );
|
||||||
AddMenuItem( sub_menu_Text, ID_POPUP_PCB_EDIT_TEXTEPCB, msg, KiBitmap( edit_text_xpm ) );
|
AddMenuItem( sub_menu_Text, ID_POPUP_PCB_EDIT_TEXTEPCB, msg, KiBitmap( edit_text_xpm ) );
|
||||||
AddMenuItem( sub_menu_Text, ID_POPUP_PCB_RESET_TEXT_SIZE,
|
AddMenuItem( sub_menu_Text, ID_POPUP_PCB_RESET_TEXT_SIZE,
|
||||||
|
|
|
@ -135,10 +135,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
|
||||||
EVT_MENU( ID_PCB_GLOBAL_DELETE, PCB_EDIT_FRAME::Process_Special_Functions )
|
EVT_MENU( ID_PCB_GLOBAL_DELETE, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
EVT_MENU( ID_MENU_PCB_CLEAN, PCB_EDIT_FRAME::Process_Special_Functions )
|
EVT_MENU( ID_MENU_PCB_CLEAN, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
EVT_MENU( ID_MENU_PCB_SWAP_LAYERS, PCB_EDIT_FRAME::Process_Special_Functions )
|
EVT_MENU( ID_MENU_PCB_SWAP_LAYERS, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
EVT_MENU( ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES,
|
EVT_MENU( ID_MENU_PCB_RESET_TEXTMODULE_FIELDS_SIZES,
|
||||||
PCB_EDIT_FRAME::Process_Special_Functions )
|
PCB_EDIT_FRAME::OnResetModuleTextSizes )
|
||||||
EVT_MENU( ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES,
|
|
||||||
PCB_EDIT_FRAME::Process_Special_Functions )
|
|
||||||
|
|
||||||
// Menu Help
|
// Menu Help
|
||||||
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
|
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
|
||||||
|
|
|
@ -66,6 +66,7 @@ enum pcbnew_ids
|
||||||
|
|
||||||
ID_POPUP_PCB_MOVE_TEXTEPCB_REQUEST,
|
ID_POPUP_PCB_MOVE_TEXTEPCB_REQUEST,
|
||||||
ID_POPUP_PCB_ROTATE_TEXTEPCB,
|
ID_POPUP_PCB_ROTATE_TEXTEPCB,
|
||||||
|
ID_POPUP_PCB_FLIP_TEXTEPCB,
|
||||||
ID_POPUP_PCB_EDIT_TEXTEPCB,
|
ID_POPUP_PCB_EDIT_TEXTEPCB,
|
||||||
ID_POPUP_PCB_DELETE_TEXTEPCB,
|
ID_POPUP_PCB_DELETE_TEXTEPCB,
|
||||||
|
|
||||||
|
@ -219,8 +220,7 @@ enum pcbnew_ids
|
||||||
ID_MENU_LIST_NETS,
|
ID_MENU_LIST_NETS,
|
||||||
ID_MENU_PCB_CLEAN,
|
ID_MENU_PCB_CLEAN,
|
||||||
ID_MENU_PCB_SWAP_LAYERS,
|
ID_MENU_PCB_SWAP_LAYERS,
|
||||||
ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES,
|
ID_MENU_PCB_RESET_TEXTMODULE_FIELDS_SIZES,
|
||||||
ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES,
|
|
||||||
|
|
||||||
ID_GEN_EXPORT_FILE_VRML,
|
ID_GEN_EXPORT_FILE_VRML,
|
||||||
ID_GEN_EXPORT_SPECCTRA,
|
ID_GEN_EXPORT_SPECCTRA,
|
||||||
|
|
|
@ -523,7 +523,8 @@ void PlotTextePcb( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts, TEXTE_PC
|
||||||
*/
|
*/
|
||||||
void PlotFilledAreas( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T trace_mode )
|
void PlotFilledAreas( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T trace_mode )
|
||||||
{
|
{
|
||||||
unsigned imax = aZone->m_FilledPolysList.size();
|
std::vector<CPolyPt> polysList = aZone->GetFilledPolysList();
|
||||||
|
unsigned imax = polysList.size();
|
||||||
|
|
||||||
if( imax == 0 ) // Nothing to draw
|
if( imax == 0 ) // Nothing to draw
|
||||||
return;
|
return;
|
||||||
|
@ -540,7 +541,7 @@ void PlotFilledAreas( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts, ZONE_
|
||||||
*/
|
*/
|
||||||
for( unsigned ic = 0; ic < imax; ic++ )
|
for( unsigned ic = 0; ic < imax; ic++ )
|
||||||
{
|
{
|
||||||
CPolyPt* corner = &aZone->m_FilledPolysList[ic];
|
CPolyPt* corner = &polysList[ic];
|
||||||
cornerList.push_back( wxPoint( corner->x, corner->y) );
|
cornerList.push_back( wxPoint( corner->x, corner->y) );
|
||||||
|
|
||||||
if( corner->end_contour ) // Plot the current filled area outline
|
if( corner->end_contour ) // Plot the current filled area outline
|
||||||
|
|
|
@ -1152,7 +1152,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR )
|
||||||
PATH* mainPolygon = new PATH( plane, T_polygon );
|
PATH* mainPolygon = new PATH( plane, T_polygon );
|
||||||
plane->SetShape( mainPolygon );
|
plane->SetShape( mainPolygon );
|
||||||
|
|
||||||
plane->name = TO_UTF8( item->m_Netname );
|
plane->name = TO_UTF8( item->GetNetName() );
|
||||||
|
|
||||||
if( plane->name.size() == 0 )
|
if( plane->name.size() == 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -800,7 +800,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone )
|
||||||
NETINFO_ITEM* net = GetBoard()->FindNet( zoneInfo.m_NetcodeSelection );
|
NETINFO_ITEM* net = GetBoard()->FindNet( zoneInfo.m_NetcodeSelection );
|
||||||
|
|
||||||
if( net ) // net == NULL should not occur
|
if( net ) // net == NULL should not occur
|
||||||
aZone->m_Netname = net->GetNetname();
|
aZone->SetNetName( net->GetNetname() );
|
||||||
|
|
||||||
// Combine zones if possible
|
// Combine zones if possible
|
||||||
GetBoard()->AreaPolygonModified( &_AuxiliaryList, aZone, true, s_Verbose );
|
GetBoard()->AreaPolygonModified( &_AuxiliaryList, aZone, true, s_Verbose );
|
||||||
|
|
|
@ -105,7 +105,7 @@ int PCB_EDIT_FRAME::Fill_Zone( ZONE_CONTAINER* aZone )
|
||||||
|
|
||||||
wxBusyCursor dummy; // Shows an hourglass cursor (removed by its destructor)
|
wxBusyCursor dummy; // Shows an hourglass cursor (removed by its destructor)
|
||||||
|
|
||||||
aZone->m_FilledPolysList.clear();
|
aZone->ClearFilledPolysList();
|
||||||
aZone->UnFill();
|
aZone->UnFill();
|
||||||
aZone->BuildFilledPolysListData( GetBoard() );
|
aZone->BuildFilledPolysListData( GetBoard() );
|
||||||
|
|
||||||
|
|
|
@ -471,6 +471,7 @@ int CopyPolygonsFromKPolygonListToFilledPolysList( ZONE_CONTAINER* aZone,
|
||||||
KPolygonSet& aKPolyList )
|
KPolygonSet& aKPolyList )
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
std::vector<CPolyPt> polysList;
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < aKPolyList.size(); ii++ )
|
for( unsigned ii = 0; ii < aKPolyList.size(); ii++ )
|
||||||
{
|
{
|
||||||
|
@ -487,14 +488,15 @@ int CopyPolygonsFromKPolygonListToFilledPolysList( ZONE_CONTAINER* aZone,
|
||||||
// Flag this corner if starting a hole connection segment:
|
// Flag this corner if starting a hole connection segment:
|
||||||
// This is used by draw functions to draw only useful segments (and not extra segments)
|
// This is used by draw functions to draw only useful segments (and not extra segments)
|
||||||
// corner.utility = (aBoolengine->GetPolygonPointEdgeType() == KB_FALSE_EDGE) ? 1 : 0;
|
// corner.utility = (aBoolengine->GetPolygonPointEdgeType() == KB_FALSE_EDGE) ? 1 : 0;
|
||||||
aZone->m_FilledPolysList.push_back( corner );
|
polysList.push_back( corner );
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
corner.end_contour = true;
|
corner.end_contour = true;
|
||||||
aZone->m_FilledPolysList.pop_back();
|
polysList.pop_back();
|
||||||
aZone->m_FilledPolysList.push_back( corner );
|
polysList.push_back( corner );
|
||||||
}
|
}
|
||||||
|
aZone->AddFilledPolysList( polysList );
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
@ -503,7 +505,8 @@ int CopyPolygonsFromKPolygonListToFilledPolysList( ZONE_CONTAINER* aZone,
|
||||||
int CopyPolygonsFromFilledPolysListTotKPolygonList( ZONE_CONTAINER* aZone,
|
int CopyPolygonsFromFilledPolysListTotKPolygonList( ZONE_CONTAINER* aZone,
|
||||||
KPolygonSet& aKPolyList )
|
KPolygonSet& aKPolyList )
|
||||||
{
|
{
|
||||||
unsigned corners_count = aZone->m_FilledPolysList.size();
|
std::vector<CPolyPt> polysList = aZone->GetFilledPolysList();
|
||||||
|
unsigned corners_count = polysList.size();
|
||||||
int count = 0;
|
int count = 0;
|
||||||
unsigned ic = 0;
|
unsigned ic = 0;
|
||||||
|
|
||||||
|
@ -511,7 +514,7 @@ int CopyPolygonsFromFilledPolysListTotKPolygonList( ZONE_CONTAINER* aZone,
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < corners_count; ii++ )
|
for( unsigned ii = 0; ii < corners_count; ii++ )
|
||||||
{
|
{
|
||||||
CPolyPt* corner = &aZone->m_FilledPolysList[ic];
|
CPolyPt* corner = &polysList[ic];
|
||||||
|
|
||||||
if( corner->end_contour )
|
if( corner->end_contour )
|
||||||
polycount++;
|
polycount++;
|
||||||
|
@ -527,7 +530,7 @@ int CopyPolygonsFromFilledPolysListTotKPolygonList( ZONE_CONTAINER* aZone,
|
||||||
{
|
{
|
||||||
for( ; ic < corners_count; ic++ )
|
for( ; ic < corners_count; ic++ )
|
||||||
{
|
{
|
||||||
CPolyPt* corner = &aZone->m_FilledPolysList[ic];
|
CPolyPt* corner = &polysList[ic];
|
||||||
cornerslist.push_back( KPolyPoint( corner->x, corner->y ) );
|
cornerslist.push_back( KPolyPoint( corner->x, corner->y ) );
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,6 @@ DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR( PCB_BASE_FRAME*
|
||||||
|
|
||||||
void DIALOG_NON_COPPER_ZONES_EDITOR::Init()
|
void DIALOG_NON_COPPER_ZONES_EDITOR::Init()
|
||||||
{
|
{
|
||||||
SetFocus();
|
|
||||||
SetReturnCode( ZONE_ABORT ); // Will be changed on button click
|
SetReturnCode( ZONE_ABORT ); // Will be changed on button click
|
||||||
|
|
||||||
m_FillModeCtrl->SetSelection( m_settings.m_FillMode ? 1 : 0 );
|
m_FillModeCtrl->SetSelection( m_settings.m_FillMode ? 1 : 0 );
|
||||||
|
|
|
@ -28,7 +28,7 @@ void Merge_SubNets_Connected_By_CopperAreas( BOARD* aPcb, int aNetcode );
|
||||||
bool sort_areas( const ZONE_CONTAINER* ref, const ZONE_CONTAINER* tst )
|
bool sort_areas( const ZONE_CONTAINER* ref, const ZONE_CONTAINER* tst )
|
||||||
{
|
{
|
||||||
if( ref->GetNet() == tst->GetNet() )
|
if( ref->GetNet() == tst->GetNet() )
|
||||||
return ref->m_FilledPolysList.size() < tst->m_FilledPolysList.size();
|
return ref->GetFilledPolysList().size() < tst->GetFilledPolysList().size();
|
||||||
else
|
else
|
||||||
return ref->GetNet() < tst->GetNet();
|
return ref->GetNet() < tst->GetNet();
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode )
|
||||||
continue;
|
continue;
|
||||||
if( (aNetcode >= 0) && ( aNetcode != curr_zone->GetNet() ) )
|
if( (aNetcode >= 0) && ( aNetcode != curr_zone->GetNet() ) )
|
||||||
continue;
|
continue;
|
||||||
if( curr_zone->m_FilledPolysList.size() == 0 )
|
if( curr_zone->GetFilledPolysList().size() == 0 )
|
||||||
continue;
|
continue;
|
||||||
zones_candidates.push_back(curr_zone);
|
zones_candidates.push_back(curr_zone);
|
||||||
}
|
}
|
||||||
|
@ -120,10 +120,11 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode )
|
||||||
|
|
||||||
// test if a candidate is inside a filled area of this zone
|
// test if a candidate is inside a filled area of this zone
|
||||||
unsigned indexstart = 0, indexend;
|
unsigned indexstart = 0, indexend;
|
||||||
for( indexend = 0; indexend < curr_zone->m_FilledPolysList.size(); indexend++ )
|
std::vector<CPolyPt> polysList = curr_zone->GetFilledPolysList();
|
||||||
|
for( indexend = 0; indexend < polysList.size(); indexend++ )
|
||||||
{
|
{
|
||||||
// end of a filled sub-area found
|
// end of a filled sub-area found
|
||||||
if( curr_zone->m_FilledPolysList[indexend].end_contour )
|
if( polysList[indexend].end_contour )
|
||||||
{
|
{
|
||||||
subnet++;
|
subnet++;
|
||||||
EDA_RECT bbox = curr_zone->CalculateSubAreaBoundaryBox( indexstart, indexend );
|
EDA_RECT bbox = curr_zone->CalculateSubAreaBoundaryBox( indexstart, indexend );
|
||||||
|
@ -162,7 +163,7 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode )
|
||||||
|
|
||||||
if( bbox.Contains( pos1 ) )
|
if( bbox.Contains( pos1 ) )
|
||||||
{
|
{
|
||||||
if( TestPointInsidePolygon( curr_zone->m_FilledPolysList, indexstart,
|
if( TestPointInsidePolygon( polysList, indexstart,
|
||||||
indexend, pos1.x, pos1.y ) )
|
indexend, pos1.x, pos1.y ) )
|
||||||
connected = true;
|
connected = true;
|
||||||
}
|
}
|
||||||
|
@ -170,7 +171,7 @@ void BOARD::Test_Connections_To_Copper_Areas( int aNetcode )
|
||||||
{
|
{
|
||||||
if( bbox.Contains( pos2 ) )
|
if( bbox.Contains( pos2 ) )
|
||||||
{
|
{
|
||||||
if( TestPointInsidePolygon( curr_zone->m_FilledPolysList,
|
if( TestPointInsidePolygon( polysList,
|
||||||
indexstart, indexend,
|
indexstart, indexend,
|
||||||
pos2.x, pos2.y ) )
|
pos2.x, pos2.y ) )
|
||||||
connected = true;
|
connected = true;
|
||||||
|
|
|
@ -282,7 +282,7 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList,
|
||||||
{
|
{
|
||||||
wxString str;
|
wxString str;
|
||||||
str.Printf( wxT( "Area %08lX of net \"%s\" has arcs intersecting other sides.\n" ),
|
str.Printf( wxT( "Area %08lX of net \"%s\" has arcs intersecting other sides.\n" ),
|
||||||
aCurrArea->GetTimeStamp(), GetChars( aCurrArea->m_Netname ) );
|
aCurrArea->GetTimeStamp(), GetChars( aCurrArea->GetNetName() ) );
|
||||||
str += wxT( "This may cause problems with other editing operations,\n" );
|
str += wxT( "This may cause problems with other editing operations,\n" );
|
||||||
str += wxT( "such as adding cutouts. It can't be fixed automatically.\n" );
|
str += wxT( "such as adding cutouts. It can't be fixed automatically.\n" );
|
||||||
str += wxT( "Manual correction is recommended." );
|
str += wxT( "Manual correction is recommended." );
|
||||||
|
@ -305,7 +305,7 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList,
|
||||||
{
|
{
|
||||||
wxString str;
|
wxString str;
|
||||||
str.Printf( wxT( "Area %08lX of net \"%s\" is self-intersecting and will be clipped.\n" ),
|
str.Printf( wxT( "Area %08lX of net \"%s\" is self-intersecting and will be clipped.\n" ),
|
||||||
aCurrArea->GetTimeStamp(), GetChars( aCurrArea->m_Netname ) );
|
aCurrArea->GetTimeStamp(), GetChars( aCurrArea->GetNetName() ) );
|
||||||
str += wxT( "This may result in splitting the area.\n" );
|
str += wxT( "This may result in splitting the area.\n" );
|
||||||
str += wxT( "If the area is complex, this may take a few seconds." );
|
str += wxT( "If the area is complex, this may take a few seconds." );
|
||||||
wxMessageBox( str );
|
wxMessageBox( str );
|
||||||
|
@ -482,7 +482,7 @@ int BOARD::CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList, int aNetCode,
|
||||||
str.Printf( wxT( "Areas %d and %d of net \"%s\" intersect, but some of the intersecting sides are arcs.\n" ),
|
str.Printf( wxT( "Areas %d and %d of net \"%s\" intersect, but some of the intersecting sides are arcs.\n" ),
|
||||||
ia1 + 1,
|
ia1 + 1,
|
||||||
ia2 + 1,
|
ia2 + 1,
|
||||||
GetChars( curr_area->m_Netname ) );
|
GetChars( curr_area->GetNetName() ) );
|
||||||
str += wxT( "Therefore, these areas can't be combined." );
|
str += wxT( "Therefore, these areas can't be combined." );
|
||||||
wxMessageBox( str );
|
wxMessageBox( str );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue