Commit e3b4eeb1 authored by Wayne Stambaugh's avatar Wayne Stambaugh

More EESchema dialog file housekeeping

parent fdb18547
...@@ -4,6 +4,18 @@ KiCad ChangeLog 2010 ...@@ -4,6 +4,18 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2010-nov-17 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
++EESchema
* Move library text edit, library draw item edit, SVG print, and BOM dialogs
to dialogs folder.
* Rename library text edit dialog file and object names to comply with
coding policy.
* Set default button in library text edit, library draw item edit, SVG print,
and BOM dialogs.
* Move BOM dialog code into BOM dialog object source file.
2010-nov-11 UPDATE Wayne Stambaugh <stambaughw@verizon.net> 2010-nov-11 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================ ================================================================================
++EESchema ++EESchema
......
...@@ -35,9 +35,10 @@ set(EESCHEMA_SRCS ...@@ -35,9 +35,10 @@ set(EESCHEMA_SRCS
dialogs/dialog_plot_schematic_PS_base.cpp dialogs/dialog_plot_schematic_PS_base.cpp
dialogs/annotate_dialog.cpp dialogs/annotate_dialog.cpp
dialogs/dialog_annotate_base.cpp dialogs/dialog_annotate_base.cpp
dialog_bodygraphictext_properties_base.cpp dialogs/dialog_lib_edit_text.cpp
dialog_build_BOM.cpp dialogs/dialog_lib_edit_text_base.cpp
dialog_build_BOM_base.cpp dialogs/dialog_build_BOM.cpp
dialogs/dialog_build_BOM_base.cpp
dialog_edit_component_in_lib.cpp dialog_edit_component_in_lib.cpp
dialog_edit_component_in_lib_base.cpp dialog_edit_component_in_lib_base.cpp
dialog_edit_component_in_schematic_fbp.cpp dialog_edit_component_in_schematic_fbp.cpp
...@@ -54,8 +55,8 @@ set(EESCHEMA_SRCS ...@@ -54,8 +55,8 @@ set(EESCHEMA_SRCS
dialogs/dialog_erc_base.cpp dialogs/dialog_erc_base.cpp
dialog_libedit_dimensions.cpp dialog_libedit_dimensions.cpp
dialog_libedit_dimensions_base.cpp dialog_libedit_dimensions_base.cpp
dialog_lib_edit_draw_item.cpp dialogs/dialog_lib_edit_draw_item.cpp
dialog_lib_edit_draw_item_base.cpp dialogs/dialog_lib_edit_draw_item_base.cpp
dialogs/dialog_lib_edit_pin.cpp dialogs/dialog_lib_edit_pin.cpp
dialogs/dialog_lib_edit_pin_base.cpp dialogs/dialog_lib_edit_pin_base.cpp
dialog_lib_new_component.cpp dialog_lib_new_component.cpp
...@@ -66,8 +67,8 @@ set(EESCHEMA_SRCS ...@@ -66,8 +67,8 @@ set(EESCHEMA_SRCS
dialog_sch_sheet_props_base.cpp dialog_sch_sheet_props_base.cpp
dialogs/dialog_schematic_find.cpp dialogs/dialog_schematic_find.cpp
dialogs/dialog_schematic_find_base.cpp dialogs/dialog_schematic_find_base.cpp
dialog_SVG_print.cpp dialogs/dialog_SVG_print.cpp
dialog_SVG_print_base.cpp dialogs/dialog_SVG_print_base.cpp
edit_component_in_lib.cpp edit_component_in_lib.cpp
edit_component_in_schematic.cpp edit_component_in_schematic.cpp
edit_label.cpp edit_label.cpp
...@@ -130,7 +131,6 @@ set(EESCHEMA_SRCS ...@@ -130,7 +131,6 @@ set(EESCHEMA_SRCS
sheetlab.cpp sheetlab.cpp
symbdraw.cpp symbdraw.cpp
symbedit.cpp symbedit.cpp
edit_graphic_bodyitem_text.cpp
template_fieldnames_keywords.cpp template_fieldnames_keywords.cpp
template_fieldnames.cpp template_fieldnames.cpp
tool_lib.cpp tool_lib.cpp
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_build_BOM.cpp
// Author: jean-pierre Charras
// Modified by:
// Licence: GPL
/////////////////////////////////////////////////////////////////////////////
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "wxstruct.h"
#include "general.h"
#include "netlist.h"
#include "wx/valgen.h"
#include "dialog_build_BOM.h"
#include "protos.h"
/* Local variables */
static bool s_ListByRef = TRUE;
static bool s_ListByValue = TRUE;
static bool s_ListWithSubCmponents;
static bool s_ListHierarchicalPinByName;
static bool s_ListBySheet;
static bool s_BrowseCreatedList;
static int s_OutputFormOpt;
static int s_OutputSeparatorOpt;
static bool s_Add_FpField_state;
static bool s_Add_F1_state;
static bool s_Add_F2_state;
static bool s_Add_F3_state;
static bool s_Add_F4_state;
static bool s_Add_F5_state;
static bool s_Add_F6_state;
static bool s_Add_F7_state;
static bool s_Add_F8_state;
static bool s_Add_Alls_state;
static bool* s_AddFieldList[] = {
&s_Add_FpField_state,
&s_Add_F1_state,
&s_Add_F2_state,
&s_Add_F3_state,
&s_Add_F4_state,
&s_Add_F5_state,
&s_Add_F6_state,
&s_Add_F7_state,
&s_Add_F8_state,
&s_Add_Alls_state,
NULL
};
#define OPTION_BOM_FORMAT wxT( "BomFormat" )
#define OPTION_BOM_LAUNCH_BROWSER wxT( "BomLaunchBrowser" )
#define OPTION_BOM_SEPARATOR wxT( "BomExportSeparator" )
#define OPTION_BOM_ADD_FIELD wxT( "BomAddField" )
/* list of separators used in bom export to spreadsheet
* (selected by s_OutputSeparatorOpt, and s_OutputSeparatorOpt radiobox)
*/
static char s_ExportSeparator[] = ("\t;,.");
/*!
* DIALOG_BUILD_BOM dialog type definition
*/
DIALOG_BUILD_BOM::DIALOG_BUILD_BOM( WinEDA_DrawFrame* parent ):
DIALOG_BUILD_BOM_BASE(parent)
{
m_Config = wxGetApp().m_EDA_Config;
wxASSERT( m_Config != NULL );
m_Parent = parent;
Init( );
if (GetSizer())
{
GetSizer()->SetSizeHints(this);
}
Centre();
}
/*!
* Init Controls for DIALOG_BUILD_BOM
*/
void DIALOG_BUILD_BOM::Init()
{
SetFocus();
/* Get options */
s_OutputFormOpt = m_Config->Read( OPTION_BOM_FORMAT, (long) 0 );
s_BrowseCreatedList = m_Config->Read( OPTION_BOM_LAUNCH_BROWSER, (long) 0 );
s_OutputSeparatorOpt = m_Config->Read( OPTION_BOM_SEPARATOR, (long) 0 );
long addfields = m_Config->Read( OPTION_BOM_ADD_FIELD, (long) 0 );
for( int ii = 0, bitmask = 1; s_AddFieldList[ii] != NULL; ii++ )
{
if( (addfields & bitmask) )
*s_AddFieldList[ii] = true;
else
*s_AddFieldList[ii] = false;
bitmask <<= 1;
}
// Set validators
m_ListCmpbyRefItems->SetValidator( wxGenericValidator(& s_ListByRef) );
m_ListSubCmpItems->SetValidator( wxGenericValidator(& s_ListWithSubCmponents) );
m_ListCmpbyValItems->SetValidator( wxGenericValidator(& s_ListByValue) );
m_GenListLabelsbyVal->SetValidator( wxGenericValidator(& s_ListHierarchicalPinByName) );
m_GenListLabelsbySheet->SetValidator( wxGenericValidator(& s_ListBySheet) );
m_OutputFormCtrl->SetValidator( wxGenericValidator(& s_OutputFormOpt) );
m_OutputSeparatorCtrl->SetValidator( wxGenericValidator(& s_OutputSeparatorOpt) );
m_GetListBrowser->SetValidator( wxGenericValidator(& s_BrowseCreatedList) );
m_AddFootprintField->SetValidator( wxGenericValidator(& s_Add_FpField_state) );
m_AddField1->SetValidator( wxGenericValidator(& s_Add_F1_state) );
m_AddField2->SetValidator( wxGenericValidator(& s_Add_F2_state) );
m_AddField3->SetValidator( wxGenericValidator(& s_Add_F3_state) );
m_AddField4->SetValidator( wxGenericValidator(& s_Add_F4_state) );
m_AddField5->SetValidator( wxGenericValidator(& s_Add_F5_state) );
m_AddField6->SetValidator( wxGenericValidator(& s_Add_F6_state) );
m_AddField7->SetValidator( wxGenericValidator(& s_Add_F7_state) );
m_AddField8->SetValidator( wxGenericValidator(& s_Add_F8_state) );
m_AddAllFields->SetValidator( wxGenericValidator(& s_Add_Alls_state) );
m_OutputFormCtrl->SetSelection( s_OutputFormOpt );
m_OutputSeparatorCtrl->SetSelection( s_OutputSeparatorOpt );
// Enable/disable options:
wxCommandEvent dummy;
OnRadioboxSelectFormatSelected( dummy );
}
/*!
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX_SELECT_FORMAT
*/
void DIALOG_BUILD_BOM::OnRadioboxSelectFormatSelected( wxCommandEvent& event )
{
if( m_OutputFormCtrl->GetSelection() == 0 )
{
m_OutputSeparatorCtrl->Enable( false );
m_ListCmpbyValItems->Enable( true );
m_GenListLabelsbyVal->Enable( true );
m_GenListLabelsbySheet->Enable( true );
} else {
m_OutputSeparatorCtrl->Enable( true );
m_ListCmpbyValItems->Enable( false );
m_GenListLabelsbyVal->Enable( false );
m_GenListLabelsbySheet->Enable( false );
}
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
*/
void DIALOG_BUILD_BOM::OnOkClick( wxCommandEvent& event )
{
char ExportSeparatorSymbol = s_ExportSeparator[0];
if( m_OutputSeparatorCtrl->GetSelection() > 0 )
ExportSeparatorSymbol = s_ExportSeparator[m_OutputSeparatorCtrl->GetSelection()];
int ExportFileType = m_OutputFormCtrl->GetSelection();
SavePreferences();
Create_BOM_Lists( ExportFileType, m_ListSubCmpItems->GetValue(),
ExportSeparatorSymbol, m_GetListBrowser->GetValue());
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
*/
void DIALOG_BUILD_BOM::OnCancelClick( wxCommandEvent& event )
{
EndModal( -1 );
}
/**************************************************/
void DIALOG_BUILD_BOM::SavePreferences()
/**************************************************/
{
wxASSERT( m_Config != NULL );
// Determine current settings of "List items" and "Options" checkboxes
// (NOTE: These 6 settings are restored when the dialog box is next
// invoked, but are *not* still saved after EESchema is next shut down.)
s_ListByRef = m_ListCmpbyRefItems->GetValue();
s_ListWithSubCmponents = m_ListSubCmpItems->GetValue();
s_ListByValue = m_ListCmpbyValItems->GetValue();
s_ListHierarchicalPinByName = m_GenListLabelsbyVal->GetValue();
s_ListBySheet = m_GenListLabelsbySheet->GetValue();
s_BrowseCreatedList = m_GetListBrowser->GetValue();
// (aved in config ):
// Determine current settings of both radiobutton groups
s_OutputFormOpt = m_OutputFormCtrl->GetSelection();
s_OutputSeparatorOpt = m_OutputSeparatorCtrl->GetSelection();
if( s_OutputSeparatorOpt < 0 )
s_OutputSeparatorOpt = 0;
// Determine current settings of all "Fields to add" checkboxes
s_Add_FpField_state = m_AddFootprintField->GetValue();
s_Add_F1_state = m_AddField1->GetValue();
s_Add_F2_state = m_AddField2->GetValue();
s_Add_F3_state = m_AddField3->GetValue();
s_Add_F4_state = m_AddField4->GetValue();
s_Add_F5_state = m_AddField5->GetValue();
s_Add_F6_state = m_AddField6->GetValue();
s_Add_F7_state = m_AddField7->GetValue();
s_Add_F8_state = m_AddField8->GetValue();
s_Add_Alls_state = m_AddAllFields->GetValue();
// Now save current settings of both radiobutton groups
m_Config->Write( OPTION_BOM_FORMAT, (long) s_OutputFormOpt );
m_Config->Write( OPTION_BOM_SEPARATOR, (long) s_OutputSeparatorOpt );
m_Config->Write( OPTION_BOM_LAUNCH_BROWSER, (long) s_BrowseCreatedList );
// Now save current settings of all "Fields to add" checkboxes
long addfields = 0;
for( int ii = 0, bitmask = 1; s_AddFieldList[ii] != NULL; ii++ )
{
if( *s_AddFieldList[ii] )
addfields |= bitmask;
bitmask <<= 1;
}
m_Config->Write( OPTION_BOM_ADD_FIELD, addfields );
}
...@@ -15,13 +15,14 @@ ...@@ -15,13 +15,14 @@
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "dialog_SVG_print_base.h"
#include "dcsvg.h" #include "dcsvg.h"
#include "general.h" #include "general.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "sch_sheet_path.h" #include "sch_sheet_path.h"
#include "dialog_SVG_print.h"
// Keys for configuration // Keys for configuration
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" ) #define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
...@@ -34,58 +35,12 @@ extern BASE_SCREEN* ActiveScreen; ...@@ -34,58 +35,12 @@ extern BASE_SCREEN* ActiveScreen;
static bool s_Print_Frame_Ref = true; static bool s_Print_Frame_Ref = true;
static int s_PlotBlackAndWhite = 0; static int s_PlotBlackAndWhite = 0;
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
{
private:
WinEDA_DrawFrame * m_Parent;
wxConfig* m_Config;
public:
DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent );
~DIALOG_SVG_PRINT( ) {}
private:
void OnCloseWindow( wxCloseEvent& event );
void OnInitDialog( wxInitDialogEvent& event );
void OnButtonPlotCurrentClick( wxCommandEvent& event );
void OnButtonPlotAllClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event );
void OnSetColorModeSelected( wxCommandEvent& event );
void SetPenWidth();
void PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref );
public:
static bool DrawSVGPage( WinEDA_DrawFrame * frame,
const wxString& FullFileName, BASE_SCREEN* screen,
bool aPrintBlackAndWhite = false,
bool aPrint_Sheet_Ref = false);
};
/* Prepare the data structures of print management and display the dialog
* window for printing sheets.
*/
void WinEDA_DrawFrame::SVG_Print( wxCommandEvent& event )
{
DIALOG_SVG_PRINT frame( this );
frame.ShowModal();
}
/* Creates the SVG print file for the current edited component.
*/
void WinEDA_LibeditFrame::SVG_Print_Component( const wxString& FullFileName )
{
DIALOG_SVG_PRINT::DrawSVGPage( this, FullFileName, GetScreen() );
}
/*! /*!
* DIALOG_SVG_PRINT functions * DIALOG_SVG_PRINT functions
*/ */
DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ) DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent ) :
: DIALOG_SVG_PRINT_base( parent ) DIALOG_SVG_PRINT_base( parent )
{ {
m_Parent = parent; m_Parent = parent;
m_Config = wxGetApp().m_EDA_Config; m_Config = wxGetApp().m_EDA_Config;
...@@ -101,16 +56,17 @@ void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event ) ...@@ -101,16 +56,17 @@ void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite ); m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite );
} }
m_ModeColorOption->SetSelection(s_PlotBlackAndWhite); m_ModeColorOption->SetSelection( s_PlotBlackAndWhite );
AddUnitSymbol(* m_TextPenWidth, g_UserUnit ); AddUnitSymbol( *m_TextPenWidth, g_UserUnit );
m_DialogPenWidth->SetValue( m_DialogPenWidth->SetValue(
ReturnStringFromValue(g_UserUnit, g_DrawDefaultLineThickness, ReturnStringFromValue( g_UserUnit, g_DrawDefaultLineThickness,
m_Parent->m_InternalUnits ) ); m_Parent->m_InternalUnits ) );
m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref ); m_Print_Sheet_Ref->SetValue( s_Print_Frame_Ref );
if (GetSizer())
if( GetSizer() )
{ {
GetSizer()->SetSizeHints(this); GetSizer()->SetSizeHints( this );
} }
} }
...@@ -152,7 +108,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ) ...@@ -152,7 +108,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
if( aPrintAll && m_Parent->m_Ident == SCHEMATIC_FRAME ) if( aPrintAll && m_Parent->m_Ident == SCHEMATIC_FRAME )
{ {
WinEDA_SchematicFrame* schframe = (WinEDA_SchematicFrame*) m_Parent; WinEDA_SchematicFrame* schframe = (WinEDA_SchematicFrame*) m_Parent;
SCH_SHEET_PATH* sheetpath, *oldsheetpath = schframe->GetSheet(); SCH_SHEET_PATH* sheetpath, * oldsheetpath = schframe->GetSheet();
SCH_SCREEN* schscreen = schframe->GetScreen(); SCH_SCREEN* schscreen = schframe->GetScreen();
oldscreen = schscreen; oldscreen = schscreen;
SCH_SHEET_LIST SheetList( NULL ); SCH_SHEET_LIST SheetList( NULL );
...@@ -164,6 +120,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ) ...@@ -164,6 +120,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
if( sheetpath == NULL ) if( sheetpath == NULL )
break; break;
list.Clear(); list.Clear();
if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) ) if( list.BuildSheetPathInfoFromSheetPathValue( sheetpath->Path() ) )
{ {
schframe->m_CurrentSheet = &list; schframe->m_CurrentSheet = &list;
...@@ -174,9 +131,10 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ) ...@@ -174,9 +131,10 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
} }
else // Should not happen else // Should not happen
return; return;
sheetpath = SheetList.GetNext(); sheetpath = SheetList.GetNext();
fn = schframe->GetUniqueFilenameForCurrentSheet( ) + wxT( ".svg" ); fn = schframe->GetUniqueFilenameForCurrentSheet() + wxT( ".svg" );
bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), schscreen, bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), schscreen,
m_ModeColorOption->GetSelection() == 0 ? false : true, m_ModeColorOption->GetSelection() == 0 ? false : true,
...@@ -187,6 +145,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ) ...@@ -187,6 +145,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
msg += wxT( "\n" ); msg += wxT( "\n" );
m_MessagesBox->AppendText( msg ); m_MessagesBox->AppendText( msg );
} }
schframe->m_CurrentSheet = oldsheetpath; schframe->m_CurrentSheet = oldsheetpath;
schframe->m_CurrentSheet->UpdateAllScreenReferences(); schframe->m_CurrentSheet->UpdateAllScreenReferences();
schframe->SetSheetNumberAndCount(); schframe->SetSheetNumberAndCount();
...@@ -199,7 +158,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ) ...@@ -199,7 +158,7 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
fn = screen->m_FileName; fn = screen->m_FileName;
fn.SetExt( wxT( "svg" ) ); fn.SetExt( wxT( "svg" ) );
fn.MakeAbsolute( ); fn.MakeAbsolute();
bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), screen, bool success = DrawSVGPage( m_Parent, fn.GetFullPath(), screen,
m_ModeColorOption->GetSelection() == 0 ? false : true, m_ModeColorOption->GetSelection() == 0 ? false : true,
...@@ -216,11 +175,12 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref ) ...@@ -216,11 +175,12 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
ActiveScreen = oldscreen; ActiveScreen = oldscreen;
} }
bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame * frame,
bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame* frame,
const wxString& FullFileName, const wxString& FullFileName,
BASE_SCREEN* screen, BASE_SCREEN* screen,
bool aPrintBlackAndWhite, bool aPrintBlackAndWhite,
bool aPrint_Sheet_Ref) bool aPrint_Sheet_Ref )
{ {
int tmpzoom; int tmpzoom;
wxPoint tmp_startvisu; wxPoint tmp_startvisu;
...@@ -233,15 +193,16 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame * frame, ...@@ -233,15 +193,16 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame * frame,
old_org = screen->m_DrawOrg; old_org = screen->m_DrawOrg;
screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0; screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0;
screen->m_StartVisu.x = screen->m_StartVisu.y = 0; screen->m_StartVisu.x = screen->m_StartVisu.y = 0;
SheetSize = screen->ReturnPageSize( ); // page size in 1/1000 inch, ie in internal units
SheetSize = screen->ReturnPageSize(); // page size in 1/1000 inch, ie in internal units
screen->SetScalingFactor( 1.0 ); screen->SetScalingFactor( 1.0 );
WinEDA_DrawPanel* panel = frame->DrawPanel; WinEDA_DrawPanel* panel = frame->DrawPanel;
SetLocaleTo_C_standard( ); // Switch the locale to standard C (needed SetLocaleTo_C_standard(); // Switch the locale to standard C (needed
// to print floating point numbers like 1.3) // to print floating point numbers like 1.3)
float dpi = (float)frame->m_InternalUnits; float dpi = (float) frame->m_InternalUnits;
wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi ); wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi );
EDA_Rect tmp = panel->m_ClipBox; EDA_Rect tmp = panel->m_ClipBox;
...@@ -256,7 +217,7 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame * frame, ...@@ -256,7 +217,7 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame * frame,
screen->m_IsPrinting = true; screen->m_IsPrinting = true;
frame->PrintPage( &dc, aPrint_Sheet_Ref, 1, false ); frame->PrintPage( &dc, aPrint_Sheet_Ref, 1, false );
SetLocaleTo_Default( ); // revert to the current locale SetLocaleTo_Default(); // revert to the current locale
screen->m_IsPrinting = false; screen->m_IsPrinting = false;
panel->m_ClipBox = tmp; panel->m_ClipBox = tmp;
...@@ -276,6 +237,7 @@ void DIALOG_SVG_PRINT::OnButtonPlotAllClick( wxCommandEvent& event ) ...@@ -276,6 +237,7 @@ void DIALOG_SVG_PRINT::OnButtonPlotAllClick( wxCommandEvent& event )
PrintSVGDoc( true, m_Print_Sheet_Ref->GetValue() ); PrintSVGDoc( true, m_Print_Sheet_Ref->GetValue() );
} }
void DIALOG_SVG_PRINT::OnButtonPlotCurrentClick( wxCommandEvent& event ) void DIALOG_SVG_PRINT::OnButtonPlotCurrentClick( wxCommandEvent& event )
{ {
PrintSVGDoc( false, m_Print_Sheet_Ref->GetValue() ); PrintSVGDoc( false, m_Print_Sheet_Ref->GetValue() );
...@@ -284,7 +246,7 @@ void DIALOG_SVG_PRINT::OnButtonPlotCurrentClick( wxCommandEvent& event ) ...@@ -284,7 +246,7 @@ void DIALOG_SVG_PRINT::OnButtonPlotCurrentClick( wxCommandEvent& event )
void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event ) void DIALOG_SVG_PRINT::OnButtonCancelClick( wxCommandEvent& event )
{ {
Close( ); Close();
} }
...@@ -300,7 +262,7 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event ) ...@@ -300,7 +262,7 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
/* called on radiobox color/black and white selection /* called on radiobox color/black and white selection
*/ */
void DIALOG_SVG_PRINT::OnSetColorModeSelected( wxCommandEvent& event ) void DIALOG_SVG_PRINT::OnSetColorModeSelected( wxCommandEvent& event )
{ {
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection(); s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
......
#ifndef _DIALOG_SVG_PRINT_H_
#define _DIALOG_SVG_PRINT_H_
class WinEDA_DrawFrame;
class BASE_SCREEN;
#include "dialog_SVG_print_base.h"
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
{
private:
WinEDA_DrawFrame* m_Parent;
wxConfig* m_Config;
public:
DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent );
~DIALOG_SVG_PRINT() {}
private:
void OnCloseWindow( wxCloseEvent& event );
void OnInitDialog( wxInitDialogEvent& event );
void OnButtonPlotCurrentClick( wxCommandEvent& event );
void OnButtonPlotAllClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event );
void OnSetColorModeSelected( wxCommandEvent& event );
void SetPenWidth();
void PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref );
public:
static bool DrawSVGPage( WinEDA_DrawFrame* frame,
const wxString& FullFileName, BASE_SCREEN* screen,
bool aPrintBlackAndWhite = false,
bool aPrint_Sheet_Ref = false );
};
#endif // _DIALOG_SVG_PRINT_H_
This diff is collapsed.
...@@ -18,7 +18,7 @@ class wxConfig; ...@@ -18,7 +18,7 @@ class wxConfig;
class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE
{ {
private: private:
WinEDA_DrawFrame * m_Parent; WinEDA_DrawFrame* m_Parent;
wxConfig* m_Config; wxConfig* m_Config;
wxString m_ListFileName; wxString m_ListFileName;
...@@ -29,13 +29,13 @@ private: ...@@ -29,13 +29,13 @@ private:
void SavePreferences(); void SavePreferences();
void Init(); void Init();
void Create_BOM_Lists(int aTypeFile, void Create_BOM_Lists( int aTypeFile,
bool aIncludeSubComponents, bool aIncludeSubComponents,
char aExportSeparatorSymbol, char aExportSeparatorSymbol,
bool aRunBrowser); bool aRunBrowser );
void GenereListeOfItems(const wxString & FullFileName, bool aIncludeSubComponents ); void GenereListeOfItems( const wxString& FullFileName, bool aIncludeSubComponents );
void CreateExportList(const wxString & FullFileName, bool aIncludeSubComponents); void CreateExportList( const wxString& FullFileName, bool aIncludeSubComponents );
/** /**
* Function CreateParstList * Function CreateParstList
...@@ -46,23 +46,23 @@ private: ...@@ -46,23 +46,23 @@ private:
*/ */
void CreatePartsList( const wxString& aFullFileName, bool aIncludeSubComponents ); void CreatePartsList( const wxString& aFullFileName, bool aIncludeSubComponents );
int PrintComponentsListByRef( FILE * f, std::vector <OBJ_CMP_TO_LIST>& aList, int PrintComponentsListByRef( FILE* f, std::vector <OBJ_CMP_TO_LIST>& aList,
bool CompactForm, bool aIncludeSubComponents ); bool CompactForm, bool aIncludeSubComponents );
int PrintComponentsListByVal( FILE *f, std::vector <OBJ_CMP_TO_LIST>& aList, int PrintComponentsListByVal( FILE* f, std::vector <OBJ_CMP_TO_LIST>& aList,
bool aIncludeSubComponents); bool aIncludeSubComponents );
int PrintComponentsListByPart( FILE *f, std::vector <OBJ_CMP_TO_LIST>& aList, int PrintComponentsListByPart( FILE* f, std::vector <OBJ_CMP_TO_LIST>& aList,
bool aIncludeSubComponents); bool aIncludeSubComponents );
void PrintFieldData(FILE * f, SCH_COMPONENT * DrawLibItem, bool CompactForm = FALSE); void PrintFieldData( FILE* f, SCH_COMPONENT* DrawLibItem, bool CompactForm = FALSE );
bool IsFieldChecked(int aFieldId); bool IsFieldChecked( int aFieldId );
public: public:
DIALOG_BUILD_BOM( WinEDA_DrawFrame* parent ); DIALOG_BUILD_BOM( WinEDA_DrawFrame* parent );
// ~DIALOG_BUILD_BOM() {}; // ~DIALOG_BUILD_BOM() {};
}; };
#endif // _DIALOG_BUILD_BOM_H_ #endif // _DIALOG_BUILD_BOM_H_
...@@ -7,8 +7,9 @@ DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM( wxWindow* parent, ...@@ -7,8 +7,9 @@ DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM( wxWindow* parent,
{ {
SetTitle( itemName + wxT( " " ) + GetTitle() ); SetTitle( itemName + wxT( " " ) + GetTitle() );
// Required under wxGTK if we want to demiss the dialog with the ESC key // Required under wxGTK if we want to dismiss the dialog with the ESC key
SetFocus(); SetFocus();
m_sdbSizer1OK->SetDefault();
} }
......
...@@ -10,45 +10,23 @@ ...@@ -10,45 +10,23 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "general.h" #include "general.h"
#include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_libentry.h" #include "class_libentry.h"
#include "lib_text.h" #include "lib_text.h"
#include "dialog_bodygraphictext_properties_base.h" #include "dialog_lib_edit_text.h"
class Dialog_BodyGraphicText_Properties : public Dialog_BodyGraphicText_Properties_base DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT( WinEDA_LibeditFrame* aParent, LIB_TEXT* aText ) :
{ DIALOG_LIB_EDIT_TEXT_BASE( aParent )
private:
WinEDA_LibeditFrame * m_Parent;
LIB_TEXT* m_GraphicText;
public:
Dialog_BodyGraphicText_Properties( WinEDA_LibeditFrame* aParent,
LIB_TEXT* aGraphicText );
~Dialog_BodyGraphicText_Properties() {};
private:
void InitDialog( );
void OnOkClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
};
Dialog_BodyGraphicText_Properties::Dialog_BodyGraphicText_Properties( WinEDA_LibeditFrame* aParent,
LIB_TEXT* aGraphicText ) :
Dialog_BodyGraphicText_Properties_base( aParent )
{ {
m_Parent = aParent; m_Parent = aParent;
m_GraphicText = aGraphicText; m_GraphicText = aText;
InitDialog( ); InitDialog();
} }
/*****************************************************/ void DIALOG_LIB_EDIT_TEXT::InitDialog( )
void Dialog_BodyGraphicText_Properties::InitDialog( )
/*****************************************************/
{ {
wxString msg; wxString msg;
...@@ -79,15 +57,15 @@ void Dialog_BodyGraphicText_Properties::InitDialog( ) ...@@ -79,15 +57,15 @@ void Dialog_BodyGraphicText_Properties::InitDialog( )
switch ( m_GraphicText->m_HJustify ) switch ( m_GraphicText->m_HJustify )
{ {
case GR_TEXT_HJUSTIFY_LEFT: case GR_TEXT_HJUSTIFY_LEFT:
m_TextHJustificationOpt->SetSelection(0); m_TextHJustificationOpt->SetSelection( 0 );
break; break;
case GR_TEXT_HJUSTIFY_CENTER: case GR_TEXT_HJUSTIFY_CENTER:
m_TextHJustificationOpt->SetSelection(1); m_TextHJustificationOpt->SetSelection( 1 );
break; break;
case GR_TEXT_HJUSTIFY_RIGHT: case GR_TEXT_HJUSTIFY_RIGHT:
m_TextHJustificationOpt->SetSelection(2); m_TextHJustificationOpt->SetSelection( 2 );
break; break;
} }
...@@ -95,15 +73,15 @@ void Dialog_BodyGraphicText_Properties::InitDialog( ) ...@@ -95,15 +73,15 @@ void Dialog_BodyGraphicText_Properties::InitDialog( )
switch ( m_GraphicText->m_VJustify ) switch ( m_GraphicText->m_VJustify )
{ {
case GR_TEXT_VJUSTIFY_BOTTOM: case GR_TEXT_VJUSTIFY_BOTTOM:
m_TextVJustificationOpt->SetSelection(0); m_TextVJustificationOpt->SetSelection( 0 );
break; break;
case GR_TEXT_VJUSTIFY_CENTER: case GR_TEXT_VJUSTIFY_CENTER:
m_TextVJustificationOpt->SetSelection(1); m_TextVJustificationOpt->SetSelection( 1 );
break; break;
case GR_TEXT_VJUSTIFY_TOP: case GR_TEXT_VJUSTIFY_TOP:
m_TextVJustificationOpt->SetSelection(2); m_TextVJustificationOpt->SetSelection( 2 );
break; break;
} }
} }
...@@ -128,19 +106,19 @@ void Dialog_BodyGraphicText_Properties::InitDialog( ) ...@@ -128,19 +106,19 @@ void Dialog_BodyGraphicText_Properties::InitDialog( )
{ {
GetSizer()->SetSizeHints(this); GetSizer()->SetSizeHints(this);
} }
m_sdbSizer1OK->SetDefault();
} }
void Dialog_BodyGraphicText_Properties::OnCancelClick( wxCommandEvent& event ) void DIALOG_LIB_EDIT_TEXT::OnCancelClick( wxCommandEvent& event )
{ {
event.Skip(); event.Skip();
} }
/***************************************************************************/
void Dialog_BodyGraphicText_Properties::OnOkClick( wxCommandEvent& event )
/***************************************************************************/
/* Updates the different parameters for the component being edited */ /* Updates the different parameters for the component being edited */
void DIALOG_LIB_EDIT_TEXT::OnOkClick( wxCommandEvent& event )
{ {
wxString Line; wxString Line;
...@@ -151,9 +129,9 @@ void Dialog_BodyGraphicText_Properties::OnOkClick( wxCommandEvent& event ) ...@@ -151,9 +129,9 @@ void Dialog_BodyGraphicText_Properties::OnOkClick( wxCommandEvent& event )
m_Parent->m_drawSpecificConvert = m_CommonConvert->GetValue() ? false : true; m_Parent->m_drawSpecificConvert = m_CommonConvert->GetValue() ? false : true;
m_Parent->m_drawSpecificUnit = m_CommonUnit->GetValue() ? false : true; m_Parent->m_drawSpecificUnit = m_CommonUnit->GetValue() ? false : true;
if ( m_GraphicText ) if( m_GraphicText )
{ {
if ( ! Line.IsEmpty() ) if( ! Line.IsEmpty() )
m_GraphicText->SetText( Line ); m_GraphicText->SetText( Line );
else else
m_GraphicText->SetText( wxT( "[null]" ) ); m_GraphicText->SetText( wxT( "[null]" ) );
...@@ -171,17 +149,17 @@ void Dialog_BodyGraphicText_Properties::OnOkClick( wxCommandEvent& event ) ...@@ -171,17 +149,17 @@ void Dialog_BodyGraphicText_Properties::OnOkClick( wxCommandEvent& event )
else else
m_GraphicText->SetConvert( 0 ); m_GraphicText->SetConvert( 0 );
if ( (m_TextShapeOpt->GetSelection() & 1 ) != 0 ) if( ( m_TextShapeOpt->GetSelection() & 1 ) != 0 )
m_GraphicText->m_Italic = true; m_GraphicText->m_Italic = true;
else else
m_GraphicText->m_Italic = false; m_GraphicText->m_Italic = false;
if ( (m_TextShapeOpt->GetSelection() & 2 ) != 0 ) if( ( m_TextShapeOpt->GetSelection() & 2 ) != 0 )
m_GraphicText->m_Bold = true; m_GraphicText->m_Bold = true;
else else
m_GraphicText->m_Bold = false; m_GraphicText->m_Bold = false;
switch ( m_TextHJustificationOpt->GetSelection() ) switch( m_TextHJustificationOpt->GetSelection() )
{ {
case 0: case 0:
m_GraphicText->m_HJustify = GR_TEXT_HJUSTIFY_LEFT; m_GraphicText->m_HJustify = GR_TEXT_HJUSTIFY_LEFT;
...@@ -196,7 +174,7 @@ void Dialog_BodyGraphicText_Properties::OnOkClick( wxCommandEvent& event ) ...@@ -196,7 +174,7 @@ void Dialog_BodyGraphicText_Properties::OnOkClick( wxCommandEvent& event )
break; break;
} }
switch ( m_TextVJustificationOpt->GetSelection() ) switch( m_TextVJustificationOpt->GetSelection() )
{ {
case 0: case 0:
m_GraphicText->m_VJustify = GR_TEXT_VJUSTIFY_BOTTOM; m_GraphicText->m_VJustify = GR_TEXT_VJUSTIFY_BOTTOM;
...@@ -211,33 +189,9 @@ void Dialog_BodyGraphicText_Properties::OnOkClick( wxCommandEvent& event ) ...@@ -211,33 +189,9 @@ void Dialog_BodyGraphicText_Properties::OnOkClick( wxCommandEvent& event )
break; break;
} }
} }
Close();
if ( m_Parent->GetDrawItem() ) if( m_Parent->GetDrawItem() )
m_Parent->GetDrawItem()->DisplayInfo( m_Parent ); m_Parent->GetDrawItem()->DisplayInfo( m_Parent );
Close();
}
void WinEDA_LibeditFrame::EditSymbolText( wxDC* DC, LIB_DRAW_ITEM* DrawItem )
{
if ( ( DrawItem == NULL ) || ( DrawItem->Type() != COMPONENT_GRAPHIC_TEXT_DRAW_TYPE ) )
return;
/* Deleting old text. */ Close();
if( DC && !DrawItem->InEditMode() )
DrawItem->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, g_XorMode, NULL, DefaultTransform );
Dialog_BodyGraphicText_Properties * frame =
new Dialog_BodyGraphicText_Properties( this, (LIB_TEXT*) DrawItem );
frame->ShowModal();
frame->Destroy();
OnModify();
/* Display new text. */
if( DC && !DrawItem->InEditMode() )
DrawItem->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, GR_DEFAULT_DRAWMODE, NULL,
DefaultTransform );
} }
#ifndef _DIALOG_LIB_EDIT_TEXT_H_
#define _DIALOG_LIB_EDIT_TEXT_H_
#include "dialog_lib_edit_text_base.h"
class WinEDA_LibeditFrame;
class LIB_TEXT;
class DIALOG_LIB_EDIT_TEXT : public DIALOG_LIB_EDIT_TEXT_BASE
{
private:
WinEDA_LibeditFrame* m_Parent;
LIB_TEXT* m_GraphicText;
public:
DIALOG_LIB_EDIT_TEXT( WinEDA_LibeditFrame* aParent, LIB_TEXT* aText );
~DIALOG_LIB_EDIT_TEXT() {};
private:
void InitDialog( );
void OnOkClick( wxCommandEvent& aEvent );
void OnCancelClick( wxCommandEvent& aEvent );
};
#endif // _DIALOG_LIB_EDIT_TEXT_H_
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "dialog_bodygraphictext_properties_base.h" #include "dialog_lib_edit_text_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
Dialog_BodyGraphicText_Properties_base::Dialog_BodyGraphicText_Properties_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bMainSizer; wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxHORIZONTAL ); bMainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bPropertiesSizer; wxBoxSizer* bPropertiesSizer;
bPropertiesSizer = new wxBoxSizer( wxVERTICAL ); bPropertiesSizer = new wxBoxSizer( wxVERTICAL );
...@@ -57,21 +57,18 @@ Dialog_BodyGraphicText_Properties_base::Dialog_BodyGraphicText_Properties_base( ...@@ -57,21 +57,18 @@ Dialog_BodyGraphicText_Properties_base::Dialog_BodyGraphicText_Properties_base(
sOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _(" Text Options : ") ), wxVERTICAL ); sOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _(" Text Options : ") ), wxVERTICAL );
m_Orient = new wxCheckBox( this, wxID_ANY, _("Vertical"), wxDefaultPosition, wxDefaultSize, 0 ); m_Orient = new wxCheckBox( this, wxID_ANY, _("Vertical"), wxDefaultPosition, wxDefaultSize, 0 );
sOptionsSizer->Add( m_Orient, 0, wxALL, 5 ); sOptionsSizer->Add( m_Orient, 0, wxALL, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
sOptionsSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); sOptionsSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_CommonUnit = new wxCheckBox( this, wxID_ANY, _("Common to Units"), wxDefaultPosition, wxDefaultSize, 0 ); m_CommonUnit = new wxCheckBox( this, wxID_ANY, _("Common to Units"), wxDefaultPosition, wxDefaultSize, 0 );
sOptionsSizer->Add( m_CommonUnit, 0, wxALL, 5 ); sOptionsSizer->Add( m_CommonUnit, 0, wxALL, 5 );
m_CommonConvert = new wxCheckBox( this, wxID_ANY, _("Common to convert"), wxDefaultPosition, wxDefaultSize, 0 ); m_CommonConvert = new wxCheckBox( this, wxID_ANY, _("Common to convert"), wxDefaultPosition, wxDefaultSize, 0 );
sOptionsSizer->Add( m_CommonConvert, 0, wxALL|wxEXPAND, 5 ); sOptionsSizer->Add( m_CommonConvert, 0, wxALL|wxEXPAND, 5 );
bBottomtBoxSizer->Add( sOptionsSizer, 0, 0, 5 ); bBottomtBoxSizer->Add( sOptionsSizer, 0, wxALL|wxEXPAND, 5 );
wxString m_TextShapeOptChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") }; wxString m_TextShapeOptChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
int m_TextShapeOptNChoices = sizeof( m_TextShapeOptChoices ) / sizeof( wxString ); int m_TextShapeOptNChoices = sizeof( m_TextShapeOptChoices ) / sizeof( wxString );
...@@ -98,30 +95,21 @@ Dialog_BodyGraphicText_Properties_base::Dialog_BodyGraphicText_Properties_base( ...@@ -98,30 +95,21 @@ Dialog_BodyGraphicText_Properties_base::Dialog_BodyGraphicText_Properties_base(
bPropertiesSizer->Add( bRightSizer, 0, wxEXPAND, 5 ); bPropertiesSizer->Add( bRightSizer, 0, wxEXPAND, 5 );
bMainSizer->Add( bPropertiesSizer, 1, wxEXPAND, 5 ); bMainSizer->Add( bPropertiesSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 6 );
wxBoxSizer* bButtonsBoxSizer;
bButtonsBoxSizer = new wxBoxSizer( wxVERTICAL );
m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); m_sdbSizer1 = new wxStdDialogButtonSizer();
bButtonsBoxSizer->Add( m_buttonOK, 0, wxALL, 5 ); m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
bButtonsBoxSizer->Add( m_buttonCANCEL, 0, wxALL, 5 ); m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
bMainSizer->Add( bButtonsBoxSizer, 0, wxALIGN_CENTER_VERTICAL, 5 ); bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 12 );
this->SetSizer( bMainSizer ); this->SetSizer( bMainSizer );
this->Layout(); this->Layout();
bMainSizer->Fit( this );
// Connect Events
m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Dialog_BodyGraphicText_Properties_base::OnOkClick ), NULL, this );
m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Dialog_BodyGraphicText_Properties_base::OnCancelClick ), NULL, this );
} }
Dialog_BodyGraphicText_Properties_base::~Dialog_BodyGraphicText_Properties_base() DIALOG_LIB_EDIT_TEXT_BASE::~DIALOG_LIB_EDIT_TEXT_BASE()
{ {
// Disconnect Events
m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Dialog_BodyGraphicText_Properties_base::OnOkClick ), NULL, this );
m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Dialog_BodyGraphicText_Properties_base::OnCancelClick ), NULL, this );
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_bodygraphictext_properties_base__ #ifndef __dialog_lib_edit_text_base__
#define __dialog_bodygraphictext_properties_base__ #define __dialog_lib_edit_text_base__
#include <wx/intl.h> #include <wx/intl.h>
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class Dialog_BodyGraphicText_Properties_base /// Class DIALOG_LIB_EDIT_TEXT_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class Dialog_BodyGraphicText_Properties_base : public wxDialog class DIALOG_LIB_EDIT_TEXT_BASE : public wxDialog
{ {
private: private:
...@@ -46,18 +46,15 @@ class Dialog_BodyGraphicText_Properties_base : public wxDialog ...@@ -46,18 +46,15 @@ class Dialog_BodyGraphicText_Properties_base : public wxDialog
wxRadioBox* m_TextShapeOpt; wxRadioBox* m_TextShapeOpt;
wxRadioBox* m_TextHJustificationOpt; wxRadioBox* m_TextHJustificationOpt;
wxRadioBox* m_TextVJustificationOpt; wxRadioBox* m_TextVJustificationOpt;
wxButton* m_buttonOK; wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_buttonCANCEL; wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
public: public:
Dialog_BodyGraphicText_Properties_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Graphic text properties:"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 511,193 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~Dialog_BodyGraphicText_Properties_base(); DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Library Text Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LIB_EDIT_TEXT_BASE();
}; };
#endif //__dialog_bodygraphictext_properties_base__ #endif //__dialog_lib_edit_text_base__
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
#include "kicad_device_context.h" #include "kicad_device_context.h"
#include "hotkeys.h" #include "hotkeys.h"
#include "dialogs/dialog_lib_edit_text.h"
#include "dialogs/dialog_SVG_print.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
...@@ -990,3 +993,33 @@ void WinEDA_LibeditFrame::ClearTempCopyComponent() ...@@ -990,3 +993,33 @@ void WinEDA_LibeditFrame::ClearTempCopyComponent()
delete m_tempCopyComponent; delete m_tempCopyComponent;
m_tempCopyComponent = NULL; m_tempCopyComponent = NULL;
} }
/* Creates the SVG print file for the current edited component.
*/
void WinEDA_LibeditFrame::SVG_Print_Component( const wxString& FullFileName )
{
DIALOG_SVG_PRINT::DrawSVGPage( this, FullFileName, GetScreen() );
}
void WinEDA_LibeditFrame::EditSymbolText( wxDC* DC, LIB_DRAW_ITEM* DrawItem )
{
if ( ( DrawItem == NULL ) || ( DrawItem->Type() != COMPONENT_GRAPHIC_TEXT_DRAW_TYPE ) )
return;
/* Deleting old text. */
if( DC && !DrawItem->InEditMode() )
DrawItem->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, g_XorMode, NULL, DefaultTransform );
DIALOG_LIB_EDIT_TEXT* frame = new DIALOG_LIB_EDIT_TEXT( this, (LIB_TEXT*) DrawItem );
frame->ShowModal();
frame->Destroy();
OnModify();
/* Display new text. */
if( DC && !DrawItem->InEditMode() )
DrawItem->Draw( DrawPanel, DC, wxPoint( 0, 0 ), -1, GR_DEFAULT_DRAWMODE, NULL,
DefaultTransform );
}
...@@ -16,8 +16,7 @@ class CMP_LIBRARY; ...@@ -16,8 +16,7 @@ class CMP_LIBRARY;
class LIB_COMPONENT; class LIB_COMPONENT;
class LIB_ALIAS; class LIB_ALIAS;
class LIB_FIELD; class LIB_FIELD;
class WinEDA_bodygraphics_PropertiesFrame; class DIALOG_LIB_EDIT_TEXT;
class Dialog_BodyGraphicText_Properties;
/** /**
...@@ -317,7 +316,7 @@ protected: ...@@ -317,7 +316,7 @@ protected:
static wxSize m_clientSize; static wxSize m_clientSize;
friend class Dialog_BodyGraphicText_Properties; friend class DIALOG_LIB_EDIT_TEXT;
/** /**
* Function CreatePNGorJPEGFile * Function CreatePNGorJPEGFile
...@@ -342,7 +341,7 @@ protected: ...@@ -342,7 +341,7 @@ protected:
bool aPrintMirrorMode, void* aData = NULL ); bool aPrintMirrorMode, void* aData = NULL );
/** /**
* Function SVG_Print_component * Function SVG_Print_Component
* Creates the SVG print file for the current edited component. * Creates the SVG print file for the current edited component.
* @param aFullFileName = the full filename of the file * @param aFullFileName = the full filename of the file
*/ */
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "block_commande.h" #include "block_commande.h"
#include "colors.h" #include "colors.h"
#include "sch_sheet_path.h"
#include <wx/wx.h> #include <wx/wx.h>
...@@ -24,6 +25,8 @@ class SCH_SHEET_PIN; ...@@ -24,6 +25,8 @@ class SCH_SHEET_PIN;
class PLOTTER; class PLOTTER;
class SCH_SHEET; class SCH_SHEET;
class LIB_PIN; class LIB_PIN;
class LABEL_OBJECT;
class OBJ_CMP_TO_LIST;
wxString ReturnDefaultFieldName( int aFieldNdx ); wxString ReturnDefaultFieldName( int aFieldNdx );
...@@ -62,6 +65,40 @@ bool LibItemInBox( int x1, int y1, int x2, int y2, SCH_COMPONENT* Draw ...@@ -62,6 +65,40 @@ bool LibItemInBox( int x1, int y1, int x2, int y2, SCH_COMPONENT* Draw
/************/ /************/
void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, SCH_ITEM* DrawStruct ); void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, SCH_ITEM* DrawStruct );
// build_BOM.cpp
/**
* Class LABEL_OBJECT
* is used in build BOM to handle the list of labels in schematic
* because in a complex hierarchy, a label is used more than once,
* and had more than one sheet path, so we must create a flat list of labels
*/
class LABEL_OBJECT
{
public:
int m_LabelType;
SCH_ITEM* m_Label;
//have to store it here since the object references will be duplicated.
SCH_SHEET_PATH m_SheetPath; //composed of UIDs
public: LABEL_OBJECT()
{
m_Label = NULL;
m_LabelType = 0;
}
};
void BuildComponentsListFromSchematic( std::vector <OBJ_CMP_TO_LIST>& aList );
void GenListeGLabels( std::vector <LABEL_OBJECT>& aList );
bool SortComponentsByReference( const OBJ_CMP_TO_LIST& obj1, const OBJ_CMP_TO_LIST& obj2 );
bool SortComponentsByValue( const OBJ_CMP_TO_LIST& obj1, const OBJ_CMP_TO_LIST& obj2 );
bool SortLabelsByValue( const LABEL_OBJECT& obj1, const LABEL_OBJECT& obj2 );
bool SortLabelsBySheet( const LABEL_OBJECT& obj1, const LABEL_OBJECT& obj2 );
void DeleteSubCmp( std::vector <OBJ_CMP_TO_LIST>& aList );
int PrintListeGLabel( FILE* f, std::vector <LABEL_OBJECT>& aList );
// operations_on_item_lists.cpp // operations_on_item_lists.cpp
/** /**
* Function DuplicateStruct * Function DuplicateStruct
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "dialog_build_BOM.h"
#include "netlist_control.h" #include "netlist_control.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "viewlib_frame.h" #include "viewlib_frame.h"
...@@ -31,9 +30,11 @@ ...@@ -31,9 +30,11 @@
#include "sch_sheet.h" #include "sch_sheet.h"
#include "dialogs/annotate_dialog.h" #include "dialogs/annotate_dialog.h"
#include "dialogs/dialog_build_BOM.h"
#include "dialogs/dialog_erc.h" #include "dialogs/dialog_erc.h"
#include "dialogs/dialog_print_using_printer.h" #include "dialogs/dialog_print_using_printer.h"
#include "dialogs/dialog_schematic_find.h" #include "dialogs/dialog_schematic_find.h"
#include "dialogs/dialog_SVG_print.h"
BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame ) BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame )
...@@ -58,7 +59,7 @@ BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame ) ...@@ -58,7 +59,7 @@ BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame )
EVT_MENU( wxID_PRINT, WinEDA_SchematicFrame::OnPrint ) EVT_MENU( wxID_PRINT, WinEDA_SchematicFrame::OnPrint )
EVT_MENU( ID_GEN_PLOT_PS, WinEDA_SchematicFrame::ToPlot_PS ) EVT_MENU( ID_GEN_PLOT_PS, WinEDA_SchematicFrame::ToPlot_PS )
EVT_MENU( ID_GEN_PLOT_HPGL, WinEDA_SchematicFrame::ToPlot_HPGL ) EVT_MENU( ID_GEN_PLOT_HPGL, WinEDA_SchematicFrame::ToPlot_HPGL )
EVT_MENU( ID_GEN_PLOT_SVG, WinEDA_DrawFrame::SVG_Print ) EVT_MENU( ID_GEN_PLOT_SVG, WinEDA_SchematicFrame::SVG_Print )
EVT_MENU( ID_GEN_PLOT_DXF, WinEDA_SchematicFrame::ToPlot_DXF ) EVT_MENU( ID_GEN_PLOT_DXF, WinEDA_SchematicFrame::ToPlot_DXF )
EVT_MENU( ID_GEN_COPY_SHEET_TO_CLIPBOARD, WinEDA_DrawFrame::CopyToClipboard ) EVT_MENU( ID_GEN_COPY_SHEET_TO_CLIPBOARD, WinEDA_DrawFrame::CopyToClipboard )
EVT_MENU( ID_GEN_COPY_BLOCK_TO_CLIPBOARD, WinEDA_DrawFrame::CopyToClipboard ) EVT_MENU( ID_GEN_COPY_BLOCK_TO_CLIPBOARD, WinEDA_DrawFrame::CopyToClipboard )
...@@ -782,3 +783,13 @@ void WinEDA_SchematicFrame::OnPrint( wxCommandEvent& event ) ...@@ -782,3 +783,13 @@ void WinEDA_SchematicFrame::OnPrint( wxCommandEvent& event )
wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() );
} }
} }
/* Creates the SVG print file for the current edited component.
*/
void WinEDA_SchematicFrame::SVG_Print( wxCommandEvent& event )
{
DIALOG_SVG_PRINT frame( this );
frame.ShowModal();
}
...@@ -14,13 +14,14 @@ ...@@ -14,13 +14,14 @@
#include "general.h" #include "general.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_libentry.h" #include "class_libentry.h"
#include "dialog_lib_edit_draw_item.h"
#include "lib_arc.h" #include "lib_arc.h"
#include "lib_circle.h" #include "lib_circle.h"
#include "lib_polyline.h" #include "lib_polyline.h"
#include "lib_rectangle.h" #include "lib_rectangle.h"
#include "lib_text.h" #include "lib_text.h"
#include "dialogs/dialog_lib_edit_draw_item.h"
static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
static void RedrawWhileMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); static void RedrawWhileMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
......
...@@ -345,6 +345,7 @@ public: ...@@ -345,6 +345,7 @@ public:
void SetPrintMonochrome( bool aMonochrome ) { m_printMonochrome = aMonochrome; } void SetPrintMonochrome( bool aMonochrome ) { m_printMonochrome = aMonochrome; }
bool GetShowSheetReference() { return m_showSheetReference; } bool GetShowSheetReference() { return m_showSheetReference; }
void SetShowSheetReference( bool aShow ) { m_showSheetReference = aShow; } void SetShowSheetReference( bool aShow ) { m_showSheetReference = aShow; }
void SVG_Print( wxCommandEvent& event );
// Plot functions: // Plot functions:
void ToPlot_PS( wxCommandEvent& event ); void ToPlot_PS( wxCommandEvent& event );
......
...@@ -154,7 +154,10 @@ public: ...@@ -154,7 +154,10 @@ public:
*/ */
void ToPrinter( wxCommandEvent& event ); void ToPrinter( wxCommandEvent& event );
/** Virtual function PrintPage void SVG_Print( wxCommandEvent& event );
/**
* Function PrintPage , virtual
* used to print a page * used to print a page
* Print the page pointed by ActiveScreen, set by the calling print function * Print the page pointed by ActiveScreen, set by the calling print function
* @param aDC = wxDC given by the calling print function * @param aDC = wxDC given by the calling print function
......
...@@ -392,8 +392,6 @@ public: ...@@ -392,8 +392,6 @@ public:
/* Return the current zoom level */ /* Return the current zoom level */
int GetZoom( void ); int GetZoom( void );
void SVG_Print( wxCommandEvent& event );
void TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width ); void TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width );
void PlotWorkSheet( PLOTTER *plotter, BASE_SCREEN* screen ); void PlotWorkSheet( PLOTTER *plotter, BASE_SCREEN* screen );
......
...@@ -12,14 +12,15 @@ ...@@ -12,14 +12,15 @@
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "dialog_SVG_print_base.h"
#include "dcsvg.h" #include "dcsvg.h"
#include "pcbnew.h" #include "pcbnew.h"
#include "pcbplot.h" #include "pcbplot.h"
#include "printout_controler.h" #include "printout_controler.h"
#include "dialog_SVG_print.h"
// Keys for configuration // Keys for configuration
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" ) #define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
...@@ -34,42 +35,6 @@ static PRINT_PARAMETERS s_Parameters; ...@@ -34,42 +35,6 @@ static PRINT_PARAMETERS s_Parameters;
static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT | static long s_SelectedLayers = LAYER_BACK | LAYER_FRONT |
SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK; SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK;
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
{
private:
WinEDA_BasePcbFrame* m_Parent;
wxConfig* m_Config;
long m_PrintMaskLayer;
wxCheckBox* m_BoxSelectLayer[32];
public:
DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent );
~DIALOG_SVG_PRINT() {}
private:
void OnCloseWindow( wxCloseEvent& event );
void initDialog( );
void OnButtonPrintSelectedClick( wxCommandEvent& event );
void OnButtonPrintBoardClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event );
void OnSetColorModeSelected( wxCommandEvent& event );
void SetPenWidth();
void PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref );
bool DrawPage( const wxString& FullFileName, BASE_SCREEN* screen,
bool aPrint_Frame_Ref );
};
/* Prepare the data structures of print management
* And displays the dialog window management of printing sheets
*/
void WinEDA_DrawFrame::SVG_Print( wxCommandEvent& event )
{
DIALOG_SVG_PRINT frame( this );
frame.ShowModal();
}
/*! /*!
* DIALOG_SVG_PRINT functions * DIALOG_SVG_PRINT functions
......
#ifndef _DIALOG_SVG_PRINT_H_
#define _DIALOG_SVG_PRINT_H_
#include "dialog_SVG_print_base.h"
class BASE_SCREEN;
class WinEDA_BasePcbFrame;
class wxConfig;
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
{
private:
WinEDA_BasePcbFrame* m_Parent;
wxConfig* m_Config;
long m_PrintMaskLayer;
wxCheckBox* m_BoxSelectLayer[32];
public:
DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent );
~DIALOG_SVG_PRINT() {}
private:
void OnCloseWindow( wxCloseEvent& event );
void initDialog( );
void OnButtonPrintSelectedClick( wxCommandEvent& event );
void OnButtonPrintBoardClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event );
void OnSetColorModeSelected( wxCommandEvent& event );
void SetPenWidth();
void PrintSVGDoc( bool aPrintAll, bool aPrint_Frame_Ref );
bool DrawPage( const wxString& FullFileName, BASE_SCREEN* screen, bool aPrint_Frame_Ref );
};
#endif // _DIALOG_SVG_PRINT_H_
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include "hotkeys.h" #include "hotkeys.h"
#include "pcbnew_config.h" #include "pcbnew_config.h"
#include "module_editor_frame.h" #include "module_editor_frame.h"
#include "dialog_SVG_print.h"
extern int g_DrawDefaultLineThickness; extern int g_DrawDefaultLineThickness;
...@@ -168,7 +169,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame ) ...@@ -168,7 +169,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
EVT_TOOL( wxID_UNDO, WinEDA_PcbFrame::GetBoardFromUndoList ) EVT_TOOL( wxID_UNDO, WinEDA_PcbFrame::GetBoardFromUndoList )
EVT_TOOL( wxID_REDO, WinEDA_PcbFrame::GetBoardFromRedoList ) EVT_TOOL( wxID_REDO, WinEDA_PcbFrame::GetBoardFromRedoList )
EVT_TOOL( wxID_PRINT, WinEDA_PcbFrame::ToPrinter ) EVT_TOOL( wxID_PRINT, WinEDA_PcbFrame::ToPrinter )
EVT_TOOL( ID_GEN_PLOT_SVG, WinEDA_DrawFrame::SVG_Print ) EVT_TOOL( ID_GEN_PLOT_SVG, WinEDA_PcbFrame::SVG_Print )
EVT_TOOL( ID_GEN_PLOT, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_GEN_PLOT, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_FIND_ITEMS, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_FIND_ITEMS, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_GET_NETLIST, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_GET_NETLIST, WinEDA_PcbFrame::Process_Special_Functions )
...@@ -721,3 +722,13 @@ void WinEDA_PcbFrame::OnModify( ) ...@@ -721,3 +722,13 @@ void WinEDA_PcbFrame::OnModify( )
m_Draw3DFrame->ReloadRequest( ); m_Draw3DFrame->ReloadRequest( );
} }
/* Prepare the data structures of print management
* And displays the dialog window management of printing sheets
*/
void WinEDA_PcbFrame::SVG_Print( wxCommandEvent& event )
{
DIALOG_SVG_PRINT frame( this );
frame.ShowModal();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment