KiCad PCB EDA Suite
DIALOG_PLOT_SCHEMATIC Class Reference

#include <dialog_plot_schematic.h>

Inheritance diagram for DIALOG_PLOT_SCHEMATIC:
DIALOG_PLOT_SCHEMATIC_BASE DIALOG_SHIM KIWAY_HOLDER

Public Types

enum  HOLDER_TYPE { DIALOG , FRAME , PANEL }
 

Public Member Functions

 DIALOG_PLOT_SCHEMATIC (SCH_EDIT_FRAME *parent)
 
bool PrjConfigChanged ()
 Return true if the project configuration was modified. More...
 
void SetInitialFocus (wxWindow *aWindow)
 Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown. More...
 
int ShowQuasiModal ()
 
void EndQuasiModal (int retCode)
 
bool IsQuasiModal () const
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
void OnPaint (wxPaintEvent &event)
 
void OnModify ()
 
void SetPosition (const wxPoint &aNewPosition)
 Force the position of the dialog to a new position. More...
 
EDA_UNITS GetUserUnits () const
 
void SetupStandardButtons (std::map< int, wxString > aLabels={})
 
HOLDER_TYPE GetType () const
 
KIWAYKiway () const
 Return a reference to the KIWAY that this object has an opportunity to participate in. More...
 
bool HasKiway () const
 Safety check before asking for the Kiway reference. More...
 
PROJECTPrj () const
 Return a reference to the PROJECT associated with this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 It is only used for debugging, since "this" is not a wxWindow*. More...
 

Static Public Member Functions

static bool IsCtrl (int aChar, const wxKeyEvent &e)
 
static bool IsShiftCtrl (int aChar, const wxKeyEvent &e)
 

Protected Member Functions

virtual void OnCloseWindow (wxCloseEvent &event)
 
virtual void OnPlotFormatSelection (wxCommandEvent &event)
 
void finishDialogSettings ()
 In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls. More...
 
void setSizeInDU (int x, int y)
 Set the dialog to the given dimensions in "dialog units". More...
 
int horizPixelsFromDU (int x) const
 Convert an integer number of dialog units to pixels, horizontally. More...
 
int vertPixelsFromDU (int y) const
 Convert an integer number of dialog units to pixels, vertically. More...
 
void resetSize ()
 Clear the existing dialog size and position. More...
 
virtual void OnCharHook (wxKeyEvent &aEvt)
 

Protected Attributes

wxStaticText * m_staticTextOutputDirectory
 
wxTextCtrl * m_outputDirectoryName
 
wxBitmapButton * m_browseButton
 
wxBoxSizer * m_optionsSizer
 
wxRadioBox * m_plotFormatOpt
 
wxStaticText * m_staticText4
 
wxChoice * m_paperSizeOption
 
wxCheckBox * m_plotDrawingSheet
 
wxChoice * m_ModeColorOption
 
wxCheckBox * m_plotBackgroundColor
 
wxStaticText * m_staticText9
 
wxChoice * m_colorTheme
 
wxStaticText * m_lineWidthLabel
 
wxTextCtrl * m_lineWidthCtrl
 
wxStaticText * m_lineWidthUnits
 
wxStaticBoxSizer * m_HPGLOptionsSizer
 
wxStaticText * m_plotOriginTitle
 
wxChoice * m_plotOriginOpt
 
wxStaticText * m_penWidthLabel
 
wxTextCtrl * m_penWidthCtrl
 
wxStaticText * m_penWidthUnits
 
WX_HTML_REPORT_PANELm_MessagesBox
 
wxStdDialogButtonSizer * m_sdbSizer1
 
wxButton * m_sdbSizer1OK
 
wxButton * m_sdbSizer1Apply
 
wxButton * m_sdbSizer1Cancel
 
EDA_UNITS m_units
 
std::string m_hash_key
 
bool m_useCalculatedSize
 
bool m_firstPaintEvent
 
wxWindow * m_initialFocusTarget
 
WX_EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 
EDA_BASE_FRAMEm_parentFrame
 
std::vector< wxWindow * > m_tabOrder
 
wxSize m_initialSize
 

Private Member Functions

void OnPageSizeSelected (wxCommandEvent &event) override
 
void OnPlotCurrent (wxCommandEvent &event) override
 
void OnPlotAll (wxCommandEvent &event) override
 
void OnUpdateUI (wxUpdateUIEvent &event) override
 
void initDlg ()
 
void getPlotOptions (RENDER_SETTINGS *aSettings)
 
bool getModeColor ()
 
void setModeColor (bool aColor)
 
COLOR_SETTINGSgetColorSettings ()
 
void OnOutputDirectoryBrowseClicked (wxCommandEvent &event) override
 Set the m_outputDirectoryName variable to the selected directory from directory dialog. More...
 
PLOT_FORMAT GetPlotFileFormat ()
 
bool getPlotDrawingSheet ()
 
void setPlotDrawingSheet (bool aPlot)
 
void plotSchematic (bool aPlotAll)
 
void createPDFFile (bool aPlotAll, bool aPlotDrawingSheet, RENDER_SETTINGS *aRenderSettings)
 
void plotOneSheetPDF (PLOTTER *aPlotter, SCH_SCREEN *aScreen, bool aPlotDrawingSheet)
 
void setupPlotPagePDF (PLOTTER *aPlotter, SCH_SCREEN *aScreen)
 
void restoreEnvironment (PDF_PLOTTER *aPlotter, SCH_SHEET_PATH &aOldsheetpath)
 Everything done, close the plot and restore the environment. More...
 
void createDXFFiles (bool aPlotAll, bool aPlotDrawingSheet, RENDER_SETTINGS *aRenderSettings)
 
bool plotOneSheetDXF (const wxString &aFileName, SCH_SCREEN *aScreen, RENDER_SETTINGS *aRenderSettings, const wxPoint &aPlotOffset, double aScale, bool aPlotFrameRef)
 
HPGL_PLOT_ORIGIN_AND_UNITS getPlotOriginAndUnits ()
 
void setPlotOriginAndUnits (HPGL_PLOT_ORIGIN_AND_UNITS aOriginAndUnits)
 
void createHPGLFiles (bool aPlotAll, bool aPlotFrameRef, RENDER_SETTINGS *aRenderSettings)
 
void setHpglPenWidth ()
 
bool plotOneSheetHpgl (const wxString &aFileName, SCH_SCREEN *aScreen, const PAGE_INFO &aPageInfo, RENDER_SETTINGS *aRenderSettings, const wxPoint &aPlot0ffset, double aScale, bool aPlotFrameRef, HPGL_PLOT_ORIGIN_AND_UNITS aOriginAndUnits)
 
void createPSFiles (bool aPlotAll, bool aPlotFrameRef, RENDER_SETTINGS *aSettings)
 
bool plotOneSheetPS (const wxString &aFileName, SCH_SCREEN *aScreen, RENDER_SETTINGS *aRenderSettings, const PAGE_INFO &aPageInfo, const wxPoint &aPlot0ffset, double aScale, bool aPlotFrameRef)
 
void createSVGFiles (bool aPrintAll, bool aPrintFrameRef, RENDER_SETTINGS *aRenderSettings)
 
bool plotOneSheetSVG (const wxString &aFileName, SCH_SCREEN *aScreen, RENDER_SETTINGS *aRenderSettings, bool aPlotBlackAndWhite, bool aPlotFrameRef)
 
wxFileName createPlotFileName (const wxString &aPlotFileName, const wxString &aExtension, REPORTER *aReporter=nullptr)
 Create a file name with an absolute path name. More...
 
wxString getOutputPath ()
 Determine the best absolute path to plot files given the contents of the path edit control. More...
 
void OnButton (wxCommandEvent &aEvent)
 Properly handle the default button events when in the quasimodal mode when not calling EndQuasiModal which is possible with any dialog derived from DIALOG_SHIM. More...
 
void OnGridEditorShown (wxGridEvent &event)
 
void OnGridEditorHidden (wxGridEvent &event)
 
 DECLARE_EVENT_TABLE ()
 

Private Attributes

SCH_EDIT_FRAMEm_parent
 
bool m_configChanged
 
PLOT_FORMAT m_plotFormat
 
double m_HPGLPenSize
 
UNIT_BINDER m_defaultLineWidth
 
UNIT_BINDER m_penWidth
 
KIWAYm_kiway
 
HOLDER_TYPE m_type
 

Static Private Attributes

static int m_pageSizeSelect = PAGE_SIZE_AUTO
 
static int m_HPGLPaperSizeSelect = PAGE_SIZE_AUTO
 

Detailed Description

Definition at line 60 of file dialog_plot_schematic.h.

Member Enumeration Documentation

◆ HOLDER_TYPE

enum KIWAY_HOLDER::HOLDER_TYPE
inherited
Enumerator
DIALOG 
FRAME 
PANEL 

Definition at line 39 of file kiway_holder.h.

Constructor & Destructor Documentation

◆ DIALOG_PLOT_SCHEMATIC()

DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC ( SCH_EDIT_FRAME parent)

Definition at line 95 of file dialog_plot_schematic.cpp.

97 m_parent( parent ),
99 m_HPGLPenSize( 1.0 ),
102{
103 m_configChanged = false;
104
106
107 m_MessagesBox->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
108
109 SetupStandardButtons( { { wxID_OK, _( "Plot All Pages" ) },
110 { wxID_APPLY, _( "Plot Current Page" ) },
111 { wxID_CANCEL, _( "Close" ) } } );
112
113 initDlg();
114
115 // Now all widgets have the size fixed, call FinishDialogSettings
117}
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:105
@ small_folder
DIALOG_PLOT_SCHEMATIC_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Plot Schematic Options"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
WX_HTML_REPORT_PANEL * m_MessagesBox
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
void SetFileName(const wxString &aReportFileName)
#define _(s)

References _, DIALOG_SHIM::finishDialogSettings(), initDlg(), KiBitmap(), DIALOG_PLOT_SCHEMATIC_BASE::m_browseButton, m_configChanged, DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox, KIWAY_HOLDER::Prj(), WX_HTML_REPORT_PANEL::SetFileName(), DIALOG_SHIM::SetupStandardButtons(), small_folder, and UNDEFINED.

Member Function Documentation

◆ createDXFFiles()

void DIALOG_PLOT_SCHEMATIC::createDXFFiles ( bool  aPlotAll,
bool  aPlotDrawingSheet,
RENDER_SETTINGS aRenderSettings 
)
private

Definition at line 455 of file dialog_plot_schematic.cpp.

457{
458 SCH_EDIT_FRAME* schframe = m_parent;
459 SCH_SHEET_PATH oldsheetpath = schframe->GetCurrentSheet();
460
461 /* When printing all pages, the printed page is not the current page. In complex hierarchies,
462 * we must update symbol references and other parameters in the given printed SCH_SCREEN,
463 * according to the sheet path because in complex hierarchies a SCH_SCREEN (a drawing ) is
464 * shared between many sheets and symbol references depend on the actual sheet path used.
465 */
466 SCH_SHEET_LIST sheetList;
467
468 if( aPlotAll )
469 {
470 sheetList.BuildSheetList( &schframe->Schematic().Root(), true );
471 sheetList.SortByPageNumbers();
472 }
473 else
474 {
475 sheetList.push_back( schframe->GetCurrentSheet() );
476 }
477
478 REPORTER& reporter = m_MessagesBox->Reporter();
479
480 for( unsigned i = 0; i < sheetList.size(); i++ )
481 {
482 schframe->SetCurrentSheet( sheetList[i] );
484 schframe->SetSheetNumberAndCount();
485
486 SCH_SCREEN* screen = schframe->GetCurrentSheet().LastScreen();
487 wxPoint plot_offset;
488 wxString msg;
489
490 try
491 {
492 wxString fname = schframe->GetUniqueFilenameForCurrentSheet();
493
494 // The sub sheet can be in a sub_hierarchy, but we plot the file in the
495 // main project folder (or the folder specified by the caller),
496 // so replace separators to create a unique filename:
497 fname.Replace( "/", "_" );
498 fname.Replace( "\\", "_" );
500 wxFileName plotFileName = createPlotFileName( fname, ext, &reporter );
501
502 if( !plotFileName.IsOk() )
503 return;
504
505 if( plotOneSheetDXF( plotFileName.GetFullPath(), screen, aRenderSettings,
506 plot_offset, 1.0, aPlotDrawingSheet ) )
507 {
508 msg.Printf( _( "Plotted to '%s'." ), plotFileName.GetFullPath() );
509 reporter.Report( msg, RPT_SEVERITY_ACTION );
510 }
511 else // Error
512 {
513 msg.Printf( _( "Failed to create file '%s'." ), plotFileName.GetFullPath() );
514 reporter.Report( msg, RPT_SEVERITY_ERROR );
515 }
516 }
517 catch( IO_ERROR& e )
518 {
519 msg.Printf( wxT( "DXF Plotter exception: %s"), e.What() );
520 reporter.Report( msg, RPT_SEVERITY_ERROR );
521 schframe->SetCurrentSheet( oldsheetpath );
523 schframe->SetSheetNumberAndCount();
524 return;
525 }
526 }
527
528 reporter.ReportTail( _( "Done." ), RPT_SEVERITY_INFO );
529
530 schframe->SetCurrentSheet( oldsheetpath );
532 schframe->SetSheetNumberAndCount();
533}
bool plotOneSheetDXF(const wxString &aFileName, SCH_SCREEN *aScreen, RENDER_SETTINGS *aRenderSettings, const wxPoint &aPlotOffset, double aScale, bool aPlotFrameRef)
wxFileName createPlotFileName(const wxString &aPlotFileName, const wxString &aExtension, REPORTER *aReporter=nullptr)
Create a file name with an absolute path name.
static wxString GetDefaultFileExtension()
Definition: plotter_dxf.h:47
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
Definition: ki_exception.h:76
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:30
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:71
virtual REPORTER & ReportTail(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Places the report at the end of the list, for objects that support report ordering.
Definition: reporter.h:99
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
SCH_SHEET & Root() const
Definition: schematic.h:92
Schematic editor (Eeschema) main window.
SCH_SHEET_PATH & GetCurrentSheet() const
SCHEMATIC & Schematic() const
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
wxString GetUniqueFilenameForCurrentSheet()
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
void SortByPageNumbers(bool aUpdateVirtualPageNums=true)
Sort the list of sheets by page number.
void BuildSheetList(SCH_SHEET *aSheet, bool aCheckIntegrity)
Build the list of sheets and their sheet path from aSheet.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void UpdateAllScreenReferences() const
Update all the symbol references for this sheet path.
SCH_SCREEN * LastScreen()
@ RPT_SEVERITY_ERROR
@ RPT_SEVERITY_INFO
@ RPT_SEVERITY_ACTION

References _, SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), SCH_EDIT_FRAME::GetCurrentSheet(), DXF_PLOTTER::GetDefaultFileExtension(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), SCH_SHEET_PATH::LastScreen(), DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox, m_parent, plotOneSheetDXF(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::ReportTail(), SCHEMATIC::Root(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, SCH_EDIT_FRAME::Schematic(), SCH_EDIT_FRAME::SetCurrentSheet(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), SCH_SHEET_LIST::SortByPageNumbers(), SCH_SHEET_PATH::UpdateAllScreenReferences(), and IO_ERROR::What().

Referenced by plotSchematic().

◆ createHPGLFiles()

void DIALOG_PLOT_SCHEMATIC::createHPGLFiles ( bool  aPlotAll,
bool  aPlotFrameRef,
RENDER_SETTINGS aRenderSettings 
)
private

Definition at line 604 of file dialog_plot_schematic.cpp.

606{
607 SCH_SCREEN* screen = m_parent->GetScreen();
608 SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet();
609
610 /* When printing all pages, the printed page is not the current page. In complex hierarchies,
611 * we must update symbol references and other parameters in the given printed SCH_SCREEN,
612 * according to the sheet path because in complex hierarchies a SCH_SCREEN (a drawing ) is
613 * shared between many sheets and symbol references depend on the actual sheet path used.
614 */
615 SCH_SHEET_LIST sheetList;
616
617 if( aPlotAll )
618 {
619 sheetList.BuildSheetList( &m_parent->Schematic().Root(), true );
620 sheetList.SortByPageNumbers();
621 }
622 else
623 {
624 sheetList.push_back( m_parent->GetCurrentSheet() );
625 }
626
627 REPORTER& reporter = m_MessagesBox->Reporter();
628
630
631 for( unsigned i = 0; i < sheetList.size(); i++ )
632 {
633 m_parent->SetCurrentSheet( sheetList[i] );
636
637 screen = m_parent->GetCurrentSheet().LastScreen();
638
639 if( !screen ) // LastScreen() may return NULL
640 screen = m_parent->GetScreen();
641
642 const PAGE_INFO& curPage = screen->GetPageSettings();
643
644 PAGE_INFO plotPage = curPage;
645
646 // if plotting on a page size other than curPage
647 if( m_paperSizeOption->GetSelection() != PAGE_DEFAULT )
648 plotPage.SetType( plot_sheet_list( m_paperSizeOption->GetSelection() ) );
649
650 // Calculation of conversion scales.
651 double plot_scale = (double) plotPage.GetWidthMils() / curPage.GetWidthMils();
652
653 // Calculate offsets
654 wxPoint plotOffset;
655 wxString msg;
656
658 {
659 plotOffset.x = plotPage.GetWidthIU() / 2;
660 plotOffset.y = -plotPage.GetHeightIU() / 2;
661 }
662
663 try
664 {
665 wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
666 // The sub sheet can be in a sub_hierarchy, but we plot the file in the
667 // main project folder (or the folder specified by the caller),
668 // so replace separators to create a unique filename:
669 fname.Replace( "/", "_" );
670 fname.Replace( "\\", "_" );
672 wxFileName plotFileName = createPlotFileName( fname, ext, &reporter );
673
674 if( !plotFileName.IsOk() )
675 return;
676
677 LOCALE_IO toggle;
678
679 if( plotOneSheetHpgl( plotFileName.GetFullPath(), screen, plotPage, aRenderSettings,
680 plotOffset, plot_scale, aPlotFrameRef, getPlotOriginAndUnits() ) )
681 {
682 msg.Printf( _( "Plotted to '%s'." ), plotFileName.GetFullPath() );
683 reporter.Report( msg, RPT_SEVERITY_ACTION );
684 }
685 else
686 {
687 msg.Printf( _( "Failed to create file '%s'." ), plotFileName.GetFullPath() );
688 reporter.Report( msg, RPT_SEVERITY_ERROR );
689 }
690 }
691 catch( IO_ERROR& e )
692 {
693 msg.Printf( wxT( "HPGL Plotter exception: %s"), e.What() );
694 reporter.Report( msg, RPT_SEVERITY_ERROR );
695 }
696 }
697
698 reporter.ReportTail( _( "Done." ), RPT_SEVERITY_INFO );
699
700 m_parent->SetCurrentSheet( oldsheetpath );
703}
bool plotOneSheetHpgl(const wxString &aFileName, SCH_SCREEN *aScreen, const PAGE_INFO &aPageInfo, RENDER_SETTINGS *aRenderSettings, const wxPoint &aPlot0ffset, double aScale, bool aPlotFrameRef, HPGL_PLOT_ORIGIN_AND_UNITS aOriginAndUnits)
HPGL_PLOT_ORIGIN_AND_UNITS getPlotOriginAndUnits()
static wxString GetDefaultFileExtension()
Definition: plotter_hpgl.h:43
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: locale_io.h:41
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
int GetWidthMils() const
Definition: page_info.h:130
bool SetType(const wxString &aStandardPageDescriptionName, bool aIsPortrait=false)
Set the name of the page type and also the sizes and margins commonly associated with that type name.
Definition: page_info.cpp:119
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:129
static const wxChar * plot_sheet_list(int aSize)

References _, SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), SCH_EDIT_FRAME::GetCurrentSheet(), HPGL_PLOTTER::GetDefaultFileExtension(), SCH_SCREEN::GetPageSettings(), getPlotOriginAndUnits(), SCH_EDIT_FRAME::GetScreen(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), PAGE_INFO::GetWidthMils(), SCH_SHEET_PATH::LastScreen(), DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox, DIALOG_PLOT_SCHEMATIC_BASE::m_paperSizeOption, m_parent, PAGE_DEFAULT, plot_sheet_list(), plotOneSheetHpgl(), PLOTTER_CENTER, REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::ReportTail(), SCHEMATIC::Root(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, SCH_EDIT_FRAME::Schematic(), SCH_EDIT_FRAME::SetCurrentSheet(), setHpglPenWidth(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), PAGE_INFO::SetType(), SCH_SHEET_LIST::SortByPageNumbers(), SCH_SHEET_PATH::UpdateAllScreenReferences(), and IO_ERROR::What().

Referenced by plotSchematic().

◆ createPDFFile()

void DIALOG_PLOT_SCHEMATIC::createPDFFile ( bool  aPlotAll,
bool  aPlotDrawingSheet,
RENDER_SETTINGS aRenderSettings 
)
private

Definition at line 780 of file dialog_plot_schematic.cpp.

782{
783 SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet(); // sheetpath is saved here
784
785 /* When printing all pages, the printed page is not the current page. In complex hierarchies,
786 * we must update symbol references and other parameters in the given printed SCH_SCREEN,
787 * according to the sheet path because in complex hierarchies a SCH_SCREEN (a drawing ) is
788 * shared between many sheets and symbol references depend on the actual sheet path used.
789 */
790 SCH_SHEET_LIST sheetList;
791
792 if( aPlotAll )
793 {
794 sheetList.BuildSheetList( &m_parent->Schematic().Root(), true );
795 sheetList.SortByPageNumbers();
796 }
797 else
798 {
799 sheetList.push_back( m_parent->GetCurrentSheet() );
800 }
801
802 // Allocate the plotter and set the job level parameter
803 PDF_PLOTTER* plotter = new PDF_PLOTTER();
804 plotter->SetRenderSettings( aRenderSettings );
805 plotter->SetColorMode( getModeColor() );
806 plotter->SetCreator( wxT( "Eeschema-PDF" ) );
808
809 wxString msg;
810 wxFileName plotFileName;
811 REPORTER& reporter = m_MessagesBox->Reporter();
812 LOCALE_IO toggle; // Switch the locale to standard C
813
814 for( unsigned i = 0; i < sheetList.size(); i++ )
815 {
816 m_parent->SetCurrentSheet( sheetList[i] );
820
821 if( i == 0 )
822 {
823 try
824 {
825 wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
826
827 // The sub sheet can be in a sub_hierarchy, but we plot the file in the main
828 // project folder (or the folder specified by the caller), so replace separators
829 // to create a unique filename:
830 fname.Replace( "/", "_" );
831 fname.Replace( "\\", "_" );
833 plotFileName = createPlotFileName( fname, ext, &reporter );
834
835 if( !plotFileName.IsOk() )
836 return;
837
838 if( !plotter->OpenFile( plotFileName.GetFullPath() ) )
839 {
840 msg.Printf( _( "Failed to create file '%s'." ), plotFileName.GetFullPath() );
841 reporter.Report( msg, RPT_SEVERITY_ERROR );
842 delete plotter;
843 return;
844 }
845
846 // Open the plotter and do the first page
847 setupPlotPagePDF( plotter, screen );
848 plotter->StartPlot();
849 }
850 catch( const IO_ERROR& e )
851 {
852 // Cannot plot PDF file
853 msg.Printf( wxT( "PDF Plotter exception: %s" ), e.What() );
854 reporter.Report( msg, RPT_SEVERITY_ERROR );
855
856 restoreEnvironment( plotter, oldsheetpath );
857 return;
858 }
859
860 }
861 else
862 {
863 /* For the following pages you need to close the (finished) page,
864 * reconfigure, and then start a new one */
865 plotter->ClosePage();
866 setupPlotPagePDF( plotter, screen );
867 plotter->StartPage();
868 }
869
870 plotOneSheetPDF( plotter, screen, aPlotDrawingSheet );
871 }
872
873 // Everything done, close the plot and restore the environment
874 msg.Printf( _( "Plotted to '%s'.\n" ), plotFileName.GetFullPath() );
875 reporter.Report( msg, RPT_SEVERITY_ACTION );
876 reporter.ReportTail( _( "Done." ), RPT_SEVERITY_INFO );
877
878 restoreEnvironment( plotter, oldsheetpath );
879}
void restoreEnvironment(PDF_PLOTTER *aPlotter, SCH_SHEET_PATH &aOldsheetpath)
Everything done, close the plot and restore the environment.
void setupPlotPagePDF(PLOTTER *aPlotter, SCH_SCREEN *aScreen)
void plotOneSheetPDF(PLOTTER *aPlotter, SCH_SCREEN *aScreen, bool aPlotDrawingSheet)
virtual void ClosePage()
Close the current page in the PDF document (and emit its compressed stream).
virtual bool OpenFile(const wxString &aFullFilename) override
Open or create the plot file aFullFilename.
virtual void StartPage()
Start a new page in the PDF document.
static wxString GetDefaultFileExtension()
virtual bool StartPlot() override
The PDF engine supports multiple pages; the first one is opened 'for free' the following are to be cl...
void SetRenderSettings(RENDER_SETTINGS *aSettings)
Definition: plotter.h:139
virtual void SetTitle(const wxString &aTitle)
Definition: plotter.h:160
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:158
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
Definition: plotter.h:136
const TITLE_BLOCK & GetTitleBlock() const override
const wxString & GetTitle() const
Definition: title_block.h:63
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject)
Definition: common.cpp:57

References _, SCH_SHEET_LIST::BuildSheetList(), PDF_PLOTTER::ClosePage(), createPlotFileName(), ExpandTextVars(), SCH_EDIT_FRAME::GetCurrentSheet(), PDF_PLOTTER::GetDefaultFileExtension(), getModeColor(), TITLE_BLOCK::GetTitle(), SCH_BASE_FRAME::GetTitleBlock(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), SCH_SHEET_PATH::LastScreen(), DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox, m_parent, PDF_PLOTTER::OpenFile(), plotOneSheetPDF(), KIWAY_HOLDER::Prj(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::ReportTail(), restoreEnvironment(), SCHEMATIC::Root(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, SCH_EDIT_FRAME::Schematic(), PLOTTER::SetColorMode(), PLOTTER::SetCreator(), SCH_EDIT_FRAME::SetCurrentSheet(), PLOTTER::SetRenderSettings(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), PLOTTER::SetTitle(), setupPlotPagePDF(), SCH_SHEET_LIST::SortByPageNumbers(), PDF_PLOTTER::StartPage(), PDF_PLOTTER::StartPlot(), SCH_SHEET_PATH::UpdateAllScreenReferences(), and IO_ERROR::What().

Referenced by plotSchematic().

◆ createPlotFileName()

wxFileName DIALOG_PLOT_SCHEMATIC::createPlotFileName ( const wxString &  aPlotFileName,
const wxString &  aExtension,
REPORTER aReporter = nullptr 
)
private

Create a file name with an absolute path name.

Parameters
aPlotFileNamethe name for the file to plot without a path.
aExtensionthe extension for the file to plot.
aReportera point to a REPORTER object use to show messages (can be NULL).
Returns
the created file name.
Exceptions
IO_ERRORon file I/O errors.

Definition at line 415 of file dialog_plot_schematic.cpp.

418{
419 wxFileName retv;
420 wxFileName tmp;
421
422 tmp.SetPath( getOutputPath() );
423 retv.SetPath( tmp.GetPath() );
424
425 if( !aPlotFileName.IsEmpty() )
426 retv.SetName( aPlotFileName );
427 else
428 retv.SetName( _( "Schematic" ) );
429
430 retv.SetExt( aExtension );
431
432 if( !EnsureFileDirectoryExists( &tmp, retv.GetFullName(), aReporter ) || !tmp.IsDirWritable() )
433 {
434 wxString msg = wxString::Format( _( "Failed to write plot files to folder '%s'." ),
435 tmp.GetPath() );
436 aReporter->Report( msg, RPT_SEVERITY_ERROR );
437 retv.Clear();
438
440 settings.m_PlotDirectoryName.Clear();
441
442 m_configChanged = true;
443 }
444 else
445 {
446 retv.SetPath( tmp.GetPath() );
447 }
448
449 wxLogTrace( tracePathsAndFiles, "Writing plot file '%s'.", retv.GetFullPath() );
450
451 return retv;
452}
wxString getOutputPath()
Determine the best absolute path to plot files given the contents of the path edit control.
These settings were stored in SCH_BASE_FRAME previously.
SCHEMATIC_SETTINGS & Settings() const
Definition: schematic.cpp:172
bool EnsureFileDirectoryExists(wxFileName *aTargetFullFileName, const wxString &aBaseFilename, REPORTER *aReporter)
Make aTargetFullFileName absolute and create the path of this file if it doesn't yet exist.
Definition: common.cpp:295
const wxChar *const tracePathsAndFiles
Flag to enable path and file name debug output.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References _, EnsureFileDirectoryExists(), Format(), getOutputPath(), m_configChanged, m_parent, SCHEMATIC_SETTINGS::m_PlotDirectoryName, REPORTER::Report(), RPT_SEVERITY_ERROR, SCH_EDIT_FRAME::Schematic(), SCHEMATIC::Settings(), and tracePathsAndFiles.

Referenced by createDXFFiles(), createHPGLFiles(), createPDFFile(), createPSFiles(), and createSVGFiles().

◆ createPSFiles()

void DIALOG_PLOT_SCHEMATIC::createPSFiles ( bool  aPlotAll,
bool  aPlotFrameRef,
RENDER_SETTINGS aSettings 
)
private

Definition at line 961 of file dialog_plot_schematic.cpp.

963{
964 SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet(); // sheetpath is saved here
965 PAGE_INFO plotPage; // page size selected to plot
966 wxString msg;
967 REPORTER& reporter = m_MessagesBox->Reporter();
968
969 /* When printing all pages, the printed page is not the current page.
970 * In complex hierarchies, we must update symbol references and other parameters in the
971 * given printed SCH_SCREEN, accordant to the sheet path because in complex hierarchies
972 * a SCH_SCREEN (a drawing ) is shared between many sheets and symbol references
973 * depend on the actual sheet path used.
974 */
975 SCH_SHEET_LIST sheetList;
976
977 if( aPlotAll )
978 {
979 sheetList.BuildSheetList( &m_parent->Schematic().Root(), true );
980 sheetList.SortByPageNumbers();
981 }
982 else
983 {
984 sheetList.push_back( m_parent->GetCurrentSheet() );
985 }
986
987 for( unsigned i = 0; i < sheetList.size(); i++ )
988 {
989 m_parent->SetCurrentSheet( sheetList[i] );
992
994 PAGE_INFO actualPage = screen->GetPageSettings();
995
996 switch( m_pageSizeSelect )
997 {
998 case PAGE_SIZE_A:
999 plotPage.SetType( wxT( "A" ) );
1000 plotPage.SetPortrait( actualPage.IsPortrait() );
1001 break;
1002
1003 case PAGE_SIZE_A4:
1004 plotPage.SetType( wxT( "A4" ) );
1005 plotPage.SetPortrait( actualPage.IsPortrait() );
1006 break;
1007
1008 case PAGE_SIZE_AUTO:
1009 default:
1010 plotPage = actualPage;
1011 break;
1012 }
1013
1014 double scalex = (double) plotPage.GetWidthMils() / actualPage.GetWidthMils();
1015 double scaley = (double) plotPage.GetHeightMils() / actualPage.GetHeightMils();
1016 double scale = std::min( scalex, scaley );
1017 wxPoint plot_offset;
1018
1019 try
1020 {
1021 wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
1022
1023 // The sub sheet can be in a sub_hierarchy, but we plot the file in the
1024 // main project folder (or the folder specified by the caller),
1025 // so replace separators to create a unique filename:
1026 fname.Replace( "/", "_" );
1027 fname.Replace ("\\", "_" );
1028 wxString ext = PS_PLOTTER::GetDefaultFileExtension();
1029 wxFileName plotFileName = createPlotFileName( fname, ext, &reporter );
1030
1031 if( !plotFileName.IsOk() )
1032 return;
1033
1034 if( plotOneSheetPS( plotFileName.GetFullPath(), screen, aRenderSettings, plotPage,
1035 plot_offset, scale, aPlotFrameRef ) )
1036 {
1037 msg.Printf( _( "Plotted to '%s'." ), plotFileName.GetFullPath() );
1038 reporter.Report( msg, RPT_SEVERITY_ACTION );
1039 }
1040 else
1041 {
1042 // Error
1043 msg.Printf( _( "Failed to create file '%s'." ), plotFileName.GetFullPath() );
1044 reporter.Report( msg, RPT_SEVERITY_ERROR );
1045 }
1046
1047 }
1048 catch( IO_ERROR& e )
1049 {
1050 msg.Printf( wxT( "PS Plotter exception: %s"), e.What() );
1051 reporter.Report( msg, RPT_SEVERITY_ERROR );
1052 }
1053 }
1054
1055 reporter.ReportTail( _( "Done." ), RPT_SEVERITY_INFO );
1056
1057 m_parent->SetCurrentSheet( oldsheetpath );
1060}
bool plotOneSheetPS(const wxString &aFileName, SCH_SCREEN *aScreen, RENDER_SETTINGS *aRenderSettings, const PAGE_INFO &aPageInfo, const wxPoint &aPlot0ffset, double aScale, bool aPlotFrameRef)
void SetPortrait(bool aIsPortrait)
Rotate the paper page 90 degrees.
Definition: page_info.cpp:186
int GetHeightMils() const
Definition: page_info.h:133
bool IsPortrait() const
Definition: page_info.h:117
static wxString GetDefaultFileExtension()
@ PAGE_SIZE_AUTO
@ PAGE_SIZE_A
@ PAGE_SIZE_A4
const int scale

References _, SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), SCH_EDIT_FRAME::GetCurrentSheet(), PS_PLOTTER::GetDefaultFileExtension(), PAGE_INFO::GetHeightMils(), SCH_SCREEN::GetPageSettings(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), PAGE_INFO::GetWidthMils(), PAGE_INFO::IsPortrait(), SCH_SHEET_PATH::LastScreen(), DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox, m_pageSizeSelect, m_parent, PAGE_SIZE_A, PAGE_SIZE_A4, PAGE_SIZE_AUTO, plotOneSheetPS(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::ReportTail(), SCHEMATIC::Root(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, scale, SCH_EDIT_FRAME::Schematic(), SCH_EDIT_FRAME::SetCurrentSheet(), PAGE_INFO::SetPortrait(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), PAGE_INFO::SetType(), SCH_SHEET_LIST::SortByPageNumbers(), SCH_SHEET_PATH::UpdateAllScreenReferences(), and IO_ERROR::What().

Referenced by plotSchematic().

◆ createSVGFiles()

void DIALOG_PLOT_SCHEMATIC::createSVGFiles ( bool  aPrintAll,
bool  aPrintFrameRef,
RENDER_SETTINGS aRenderSettings 
)
private

Definition at line 1121 of file dialog_plot_schematic.cpp.

1123{
1124 wxString msg;
1125 REPORTER& reporter = m_MessagesBox->Reporter();
1126 SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet();
1127 SCH_SHEET_LIST sheetList;
1128
1129 if( aPrintAll )
1130 {
1131 sheetList.BuildSheetList( &m_parent->Schematic().Root(), true );
1132 sheetList.SortByPageNumbers();
1133 }
1134 else
1135 {
1136 sheetList.push_back( m_parent->GetCurrentSheet() );
1137 }
1138
1139 for( unsigned i = 0; i < sheetList.size(); i++ )
1140 {
1141 SCH_SCREEN* screen;
1142 m_parent->SetCurrentSheet( sheetList[i] );
1145 screen = m_parent->GetCurrentSheet().LastScreen();
1146
1147 try
1148 {
1149 wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
1150
1151 // The sub sheet can be in a sub_hierarchy, but we plot the file in the
1152 // main project folder (or the folder specified by the caller),
1153 // so replace separators to create a unique filename:
1154 fname.Replace( "/", "_" );
1155 fname.Replace( "\\", "_" );
1156 wxString ext = SVG_PLOTTER::GetDefaultFileExtension();
1157 wxFileName plotFileName = createPlotFileName( fname, ext, &reporter );
1158
1159 if( !plotFileName.IsOk() )
1160 return;
1161
1162 bool success = plotOneSheetSVG( plotFileName.GetFullPath(), screen, aRenderSettings,
1163 getModeColor() ? false : true, aPrintFrameRef );
1164
1165 if( !success )
1166 {
1167 msg.Printf( _( "Failed to create file '%s'." ), plotFileName.GetFullPath() );
1168 reporter.Report( msg, RPT_SEVERITY_ERROR );
1169 }
1170 else
1171 {
1172 msg.Printf( _( "Plotted to '%s'." ), plotFileName.GetFullPath() );
1173 reporter.Report( msg, RPT_SEVERITY_ACTION );
1174 }
1175 }
1176 catch( const IO_ERROR& e )
1177 {
1178 // Cannot plot SVG file
1179 msg.Printf( wxT( "SVG Plotter exception: %s" ), e.What() );
1180 reporter.Report( msg, RPT_SEVERITY_ERROR );
1181 break;
1182 }
1183 }
1184
1185 reporter.ReportTail( _( "Done" ), RPT_SEVERITY_INFO );
1186
1187 m_parent->SetCurrentSheet( oldsheetpath );
1190}
bool plotOneSheetSVG(const wxString &aFileName, SCH_SCREEN *aScreen, RENDER_SETTINGS *aRenderSettings, bool aPlotBlackAndWhite, bool aPlotFrameRef)
static wxString GetDefaultFileExtension()

References _, SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), SCH_EDIT_FRAME::GetCurrentSheet(), SVG_PLOTTER::GetDefaultFileExtension(), getModeColor(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), SCH_SHEET_PATH::LastScreen(), DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox, m_parent, plotOneSheetSVG(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::ReportTail(), SCHEMATIC::Root(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, SCH_EDIT_FRAME::Schematic(), SCH_EDIT_FRAME::SetCurrentSheet(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), SCH_SHEET_LIST::SortByPageNumbers(), SCH_SHEET_PATH::UpdateAllScreenReferences(), and IO_ERROR::What().

Referenced by plotSchematic().

◆ DECLARE_EVENT_TABLE()

DIALOG_SHIM::DECLARE_EVENT_TABLE ( )
privateinherited

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 319 of file dialog_shim.cpp.

320{
321 // so we can do logging of this state change:
322 return wxDialog::Enable( enable );
323}

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 487 of file dialog_shim.cpp.

488{
489 // Hook up validator and transfer data from controls handling so quasi-modal dialogs
490 // handle validation in the same way as other dialogs.
491 if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
492 return;
493
494 SetReturnCode( retCode );
495
496 if( !IsQuasiModal() )
497 {
498 wxFAIL_MSG( wxT( "Either DIALOG_SHIM::EndQuasiModal was called twice, or ShowQuasiModal"
499 "wasn't called" ) );
500 return;
501 }
502
503 if( m_qmodal_loop )
504 {
505 if( m_qmodal_loop->IsRunning() )
506 m_qmodal_loop->Exit( 0 );
507 else
508 m_qmodal_loop->ScheduleExit( 0 );
509
510 m_qmodal_loop = nullptr;
511 }
512
514 m_qmodal_parent_disabler = nullptr;
515
516 Show( false );
517}
bool Show(bool show) override
bool IsQuasiModal() const
Definition: dialog_shim.h:106
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:218
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:215

References DIALOG_SHIM::IsQuasiModal(), DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, and DIALOG_SHIM::Show().

Referenced by EDA_3D_CONTROLLER::Main(), NETLIST_DIALOG::OnAddGenerator(), DIALOG_SHIM::OnButton(), DIALOG_EDIT_SYMBOLS_LIBID::onCancel(), DIALOG_LIB_SYMBOL_PROPERTIES::OnCancelButtonClick(), DIALOG_SYMBOL_PROPERTIES::OnCancelButtonClick(), DIALOG_LIB_EDIT_PIN_TABLE::OnClose(), DIALOG_CHOOSE_FOOTPRINT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), NETLIST_DIALOG::OnDelGenerator(), DIALOG_SYMBOL_PROPERTIES::OnEditLibrarySymbol(), DIALOG_SYMBOL_PROPERTIES::OnEditSymbol(), DIALOG_SYMBOL_PROPERTIES::OnExchangeSymbol(), PCB_ONE_LAYER_SELECTOR::OnLeftGridCellClick(), PCB_ONE_LAYER_SELECTOR::OnRightGridCellClick(), DIALOG_SYMBOL_PROPERTIES::OnUpdateSymbol(), DIALOG_CHOOSE_FOOTPRINT::OnUseBrowser(), DIALOG_PUSH_PAD_PROPERTIES::PadPropertiesAccept(), and DIALOG_SHIM::~DIALOG_SHIM().

◆ finishDialogSettings()

void DIALOG_SHIM::finishDialogSettings ( )
protectedinherited

In all dialogs, we must call the same functions to fix minimal dlg size, the default position and perhaps some others to fix a few issues depending on Windows Managers this helper function does these calls.

finishDialogSettings must be called from derived classes after all widgets have been initialized, and therefore their size fixed. If TransferDataToWindow() is used to initialize widgets, at the end of TransferDataToWindow, or better yet, at end of a wxInitDialogEvent handler.

Definition at line 158 of file dialog_shim.cpp.

159{
160 // must be called from the constructor of derived classes,
161 // when all widgets are initialized, and therefore their size fixed
162
163 // SetSizeHints fixes the minimal size of sizers in the dialog
164 // (SetSizeHints calls Fit(), so no need to call it)
165 GetSizer()->SetSizeHints( this );
166}

Referenced by CONVERT_SETTINGS_DIALOG::CONVERT_SETTINGS_DIALOG(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOM::DIALOG_BOM(), DIALOG_BUS_MANAGER::DIALOG_BUS_MANAGER(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_DRC::DIALOG_DRC(), DIALOG_EDIT_SYMBOLS_LIBID::DIALOG_EDIT_SYMBOLS_LIBID(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), DIALOG_ERC::DIALOG_ERC(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(), DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMAGE_PROPERTIES::DIALOG_IMAGE_PROPERTIES(), DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS(), DIALOG_INSPECTOR::DIALOG_INSPECTOR(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), DIALOG_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES(), DIALOG_LINE_PROPERTIES::DIALOG_LINE_PROPERTIES(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY(), DIALOG_MANAGE_REPOSITORIES::DIALOG_MANAGE_REPOSITORIES(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NET_INSPECTOR::DIALOG_NET_INSPECTOR(), DIALOG_NETLIST_IMPORT::DIALOG_NETLIST_IMPORT(), DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL(), DIALOG_PCM::DIALOG_PCM(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_PLOT_SCHEMATIC(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC(), DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER(), DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES(), DIALOG_REGULATOR_FORM::DIALOG_REGULATOR_FORM(), DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SELECT_3DMODEL::DIALOG_SELECT_3DMODEL(), DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES(), DIALOG_SIM_MODEL< T >::DIALOG_SIM_MODEL(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), DIALOG_UPDATE_SYMBOL_FIELDS::DIALOG_UPDATE_SYMBOL_FIELDS(), DIALOG_WIRE_BUS_PROPERTIES::DIALOG_WIRE_BUS_PROPERTIES(), PAGED_DIALOG::finishInitialization(), DIALOG_CONSTRAINTS_REPORTER::FinishInitialization(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_SHEET_PROPERTIES::OnInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SYMBOL_PROPERTIES::OnInitDlg(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), TEARDROP_DIALOG::TEARDROP_DIALOG(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_COLOR_PICKER::TransferDataToWindow(), and DIALOG_BOARD_STATISTICS::TransferDataToWindow().

◆ getColorSettings()

COLOR_SETTINGS * DIALOG_PLOT_SCHEMATIC::getColorSettings ( )
private

Definition at line 364 of file dialog_plot_schematic.cpp.

365{
366 int selection = m_colorTheme->GetSelection();
367
368 if( selection < 0 )
369 return m_parent->GetSettingsManager()->GetColorSettings( "_builtin_default" );
370
371 return static_cast<COLOR_SETTINGS*>( m_colorTheme->GetClientData( selection ) );
372}
Color settings are a bit different than most of the settings objects in that there can be more than o...
SETTINGS_MANAGER * GetSettingsManager() const
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.

References SETTINGS_MANAGER::GetColorSettings(), EDA_BASE_FRAME::GetSettingsManager(), DIALOG_PLOT_SCHEMATIC_BASE::m_colorTheme, and m_parent.

Referenced by getPlotOptions(), plotOneSheetDXF(), and plotOneSheetHpgl().

◆ getModeColor()

bool DIALOG_PLOT_SCHEMATIC::getModeColor ( )
inlineprivate

◆ getOutputPath()

wxString DIALOG_PLOT_SCHEMATIC::getOutputPath ( )
private

Determine the best absolute path to plot files given the contents of the path edit control.

  • If the path edit control results in an absolute path, use it as is.
  • If the path edit control is not an absolute path and the project file is valid, use the project root path to normalize the contents of the path edit control.
  • If the path edit control is not an absolute path and the project file does not exist and the screen file name is valid, use the screen file name path.
  • If the path edit control is not an absolute path and the project file does not exist and the screen file name is empty, user the user's documents folder.
  • Fall back to the user's document path if any of the above conditions do not result in a valid absolute path.
Returns
a valid path to write the plot files.

Definition at line 1254 of file dialog_plot_schematic.cpp.

1255{
1256 wxString msg;
1257 wxString extMsg;
1258 wxFileName fn;
1259
1260 extMsg.Printf( _( "Falling back to user path '%s'." ),
1261 wxStandardPaths::Get().GetDocumentsDir() );
1262
1263 // Build the absolute path of current output directory to preselect it in the file browser.
1264 std::function<bool( wxString* )> textResolver =
1265 [&]( wxString* token ) -> bool
1266 {
1267 return m_parent->Schematic().ResolveTextVar( token, 0 );
1268 };
1269
1270 wxString path = m_outputDirectoryName->GetValue();
1271 path = ExpandTextVars( path, &textResolver, nullptr, &Prj() );
1273
1274 fn.SetPath( path );
1275
1276 // If the contents of the path edit control results in an absolute path, return it as is.
1277 if( fn.IsAbsolute() )
1278 return path;
1279
1280 // When editing a schematic that is not part of a project in the stand alone mode, the
1281 // project path is not defined.
1282 if( Prj().IsNullProject() )
1283 {
1284 SCH_SCREEN* screen = m_parent->Schematic().RootScreen();
1285
1286 if( screen && !screen->GetFileName().IsEmpty() )
1287 {
1288 fn = screen->GetFileName();
1289 msg.Printf( _( "Cannot normalize path '%s%s'." ), fn.GetPathWithSep(), path );
1290 fn.SetPath( fn.GetPathWithSep() + path );
1291
1292 // Normalize always returns true for a non-empty file name so clear the file name
1293 // and extension so that only the path is normalized.
1294 fn.SetName( wxEmptyString );
1295 fn.SetExt( wxEmptyString );
1296
1297 if( fn.Normalize() )
1298 {
1299 path = fn.GetPath();
1300 }
1301 else
1302 {
1303 wxMessageDialog dlg( this, msg, _( "Warning" ), wxOK | wxCENTER | wxRESIZE_BORDER
1304 | wxICON_EXCLAMATION | wxSTAY_ON_TOP );
1305
1306 dlg.SetExtendedMessage( extMsg );
1307 dlg.ShowModal();
1308
1309 path = wxStandardPaths::Get().GetDocumentsDir();
1310 }
1311 }
1312 else
1313 {
1314 msg = _( "No project or path defined for the current schematic." );
1315
1316 wxMessageDialog dlg( this, msg, _( "Warning" ), wxOK | wxCENTER | wxRESIZE_BORDER
1317 | wxICON_EXCLAMATION | wxSTAY_ON_TOP );
1318 dlg.SetExtendedMessage( extMsg );
1319 dlg.ShowModal();
1320
1321 // Always fall back to user's document path if no other absolute path can be normalized.
1322 path = wxStandardPaths::Get().GetDocumentsDir();
1323 }
1324 }
1325 else
1326 {
1327 msg.Printf( _( "Cannot normalize path '%s%s'." ), Prj().GetProjectPath(), path );
1328
1329 // Build the absolute path of current output directory and the project path.
1330 fn.SetPath( Prj().GetProjectPath() + path );
1331
1332 if( fn.Normalize() )
1333 {
1334 path = fn.GetPath();
1335 }
1336 else
1337 {
1338 wxMessageDialog dlg( this, msg, _( "Warning" ),
1339 wxOK | wxCENTER | wxRESIZE_BORDER | wxICON_EXCLAMATION |
1340 wxSTAY_ON_TOP );
1341
1342 dlg.SetExtendedMessage( extMsg );
1343 dlg.ShowModal();
1344
1345 path = wxStandardPaths::Get().GetDocumentsDir();
1346 }
1347 }
1348
1349 return path;
1350}
bool ResolveTextVar(wxString *token, int aDepth) const
Definition: schematic.cpp:123
SCH_SCREEN * RootScreen() const
Helper to retrieve the screen of the root sheet.
Definition: schematic.cpp:117
const wxString & GetFileName() const
Definition: sch_screen.h:142
const wxString ExpandEnvVarSubstitutions(const wxString &aString, PROJECT *aProject)
Replace any environment variable & text variable references with their values.
Definition: common.cpp:267

References _, ExpandEnvVarSubstitutions(), ExpandTextVars(), SCH_SCREEN::GetFileName(), DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_parent, path, KIWAY_HOLDER::Prj(), SCHEMATIC::ResolveTextVar(), SCHEMATIC::RootScreen(), and SCH_EDIT_FRAME::Schematic().

Referenced by createPlotFileName().

◆ getPlotDrawingSheet()

bool DIALOG_PLOT_SCHEMATIC::getPlotDrawingSheet ( )
inlineprivate

Definition at line 94 of file dialog_plot_schematic.h.

94{ return m_plotDrawingSheet->GetValue(); }

References DIALOG_PLOT_SCHEMATIC_BASE::m_plotDrawingSheet.

Referenced by getPlotOptions(), and plotSchematic().

◆ GetPlotFileFormat()

PLOT_FORMAT DIALOG_PLOT_SCHEMATIC::GetPlotFileFormat ( )
private

Definition at line 241 of file dialog_plot_schematic.cpp.

242{
243 switch( m_plotFormatOpt->GetSelection() )
244 {
245 default:
246 case 0: return PLOT_FORMAT::POST;
247 case 1: return PLOT_FORMAT::PDF;
248 case 2: return PLOT_FORMAT::SVG;
249 case 3: return PLOT_FORMAT::DXF;
250 case 4: return PLOT_FORMAT::HPGL;
251 }
252}

References DXF, HPGL, DIALOG_PLOT_SCHEMATIC_BASE::m_plotFormatOpt, PDF, POST, and SVG.

Referenced by getPlotOptions(), OnPageSizeSelected(), OnUpdateUI(), and plotSchematic().

◆ getPlotOptions()

void DIALOG_PLOT_SCHEMATIC::getPlotOptions ( RENDER_SETTINGS aSettings)
private

Definition at line 320 of file dialog_plot_schematic.cpp.

321{
323
324 EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
325 wxASSERT( cfg );
326
328
329 if( cfg )
330 {
333 cfg->m_PlotPanel.color_theme = colors->GetFilename();
335 cfg->m_PlotPanel.format = static_cast<int>( GetPlotFileFormat() );
336 cfg->m_PlotPanel.hpgl_origin = m_plotOriginOpt->GetSelection();
338
339 // HPGL Pen Size is stored in mm in config
341 }
342
343 aSettings->LoadColors( colors );
344 aSettings->SetMinPenWidth( (int) m_defaultLineWidth.GetValue() );
345
346 if( m_plotBackgroundColor->GetValue() )
348 else
349 aSettings->SetBackgroundColor( COLOR4D::UNSPECIFIED );
350
351 // Plot directory
352 wxString path = m_outputDirectoryName->GetValue();
353 path.Replace( '\\', '/' );
354
356
357 if( settings.m_PlotDirectoryName != path )
358 m_configChanged = true;
359
360 settings.m_PlotDirectoryName = path;
361}
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
COLOR4D GetColor(int aLayer) const
COLOR_SETTINGS * getColorSettings()
wxString GetFilename() const
Definition: json_settings.h:72
APP_SETTINGS_BASE * KifaceSettings() const
Definition: kiface_base.h:93
virtual void LoadColors(const COLOR_SETTINGS *aSettings)
virtual void SetBackgroundColor(const COLOR4D &aColor)=0
Set the background color.
void SetMinPenWidth(int aWidth)
virtual long long int GetValue()
Return the current value in Internal Units.
@ LAYER_SCHEMATIC_BACKGROUND
Definition: layer_ids.h:376
static constexpr double IU_PER_MM
Mock up a conversion function.

References EESCHEMA_SETTINGS::PANEL_PLOT::background_color, EESCHEMA_SETTINGS::PANEL_PLOT::color, EESCHEMA_SETTINGS::PANEL_PLOT::color_theme, EESCHEMA_SETTINGS::PANEL_PLOT::format, EESCHEMA_SETTINGS::PANEL_PLOT::frame_reference, COLOR_SETTINGS::GetColor(), getColorSettings(), JSON_SETTINGS::GetFilename(), getModeColor(), getPlotDrawingSheet(), GetPlotFileFormat(), UNIT_BINDER::GetValue(), EESCHEMA_SETTINGS::PANEL_PLOT::hpgl_origin, EESCHEMA_SETTINGS::PANEL_PLOT::hpgl_paper_size, EESCHEMA_SETTINGS::PANEL_PLOT::hpgl_pen_size, IU_PER_MM, Kiface(), KIFACE_BASE::KifaceSettings(), LAYER_SCHEMATIC_BACKGROUND, KIGFX::RENDER_SETTINGS::LoadColors(), m_configChanged, m_defaultLineWidth, m_HPGLPaperSizeSelect, m_HPGLPenSize, DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_parent, m_penWidth, DIALOG_PLOT_SCHEMATIC_BASE::m_plotBackgroundColor, SCHEMATIC_SETTINGS::m_PlotDirectoryName, DIALOG_PLOT_SCHEMATIC_BASE::m_plotOriginOpt, EESCHEMA_SETTINGS::m_PlotPanel, path, SCH_EDIT_FRAME::Schematic(), KIGFX::RENDER_SETTINGS::SetBackgroundColor(), KIGFX::RENDER_SETTINGS::SetMinPenWidth(), and SCHEMATIC::Settings().

Referenced by plotSchematic().

◆ getPlotOriginAndUnits()

HPGL_PLOT_ORIGIN_AND_UNITS DIALOG_PLOT_SCHEMATIC::getPlotOriginAndUnits ( )
inlineprivate

◆ GetType()

HOLDER_TYPE KIWAY_HOLDER::GetType ( ) const
inlineinherited

Definition at line 46 of file kiway_holder.h.

46{ return m_type; }
HOLDER_TYPE m_type
Definition: kiway_holder.h:85

References KIWAY_HOLDER::m_type.

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ GetUserUnits()

◆ HasKiway()

bool KIWAY_HOLDER::HasKiway ( ) const
inlineinherited

Safety check before asking for the Kiway reference.

Returns
true if kiway is non-null

Definition at line 63 of file kiway_holder.h.

64 {
65 return m_kiway != nullptr;
66 }
KIWAY * m_kiway
Definition: kiway_holder.h:84

References KIWAY_HOLDER::m_kiway.

Referenced by DIALOG_SHIM::~DIALOG_SHIM().

◆ horizPixelsFromDU()

int DIALOG_SHIM::horizPixelsFromDU ( int  x) const
protectedinherited

Convert an integer number of dialog units to pixels, horizontally.

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 176 of file dialog_shim.cpp.

177{
178 wxSize sz( x, 0 );
179 return ConvertDialogToPixels( sz ).x;
180}

Referenced by DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), and DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

◆ initDlg()

void DIALOG_PLOT_SCHEMATIC::initDlg ( )
private

Definition at line 120 of file dialog_plot_schematic.cpp.

121{
122 auto cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
123 wxASSERT( cfg );
124
125 if( cfg )
126 {
128 {
129 int idx = m_colorTheme->Append( settings->GetName(), static_cast<void*>( settings ) );
130
131 if( settings->GetFilename() == cfg->m_PlotPanel.color_theme )
132 m_colorTheme->SetSelection( idx );
133 }
134
135 m_colorTheme->Enable( cfg->m_PlotPanel.color );
136
137 m_plotBackgroundColor->Enable( cfg->m_PlotPanel.color );
138 m_plotBackgroundColor->SetValue( cfg->m_PlotPanel.background_color );
139
140 // Set color or B&W plot option
141 setModeColor( cfg->m_PlotPanel.color );
142
143 // Set plot or not frame reference option
144 setPlotDrawingSheet( cfg->m_PlotPanel.frame_reference );
145
146 // HPGL plot origin and unit system configuration
147 m_plotOriginOpt->SetSelection( cfg->m_PlotPanel.hpgl_origin );
148
149 m_HPGLPaperSizeSelect = cfg->m_PlotPanel.hpgl_paper_size;
150
151 // HPGL Pen Size is stored in mm in config
152 m_HPGLPenSize = cfg->m_PlotPanel.hpgl_pen_size * IU_PER_MM;
153
154 // Switch to the last save plot format
155 PLOT_FORMAT fmt = static_cast<PLOT_FORMAT>( cfg->m_PlotPanel.format );
156
157 switch( fmt )
158 {
159 default:
160 case PLOT_FORMAT::POST: m_plotFormatOpt->SetSelection( 0 ); break;
161 case PLOT_FORMAT::PDF: m_plotFormatOpt->SetSelection( 1 ); break;
162 case PLOT_FORMAT::SVG: m_plotFormatOpt->SetSelection( 2 ); break;
163 case PLOT_FORMAT::DXF: m_plotFormatOpt->SetSelection( 3 ); break;
164 case PLOT_FORMAT::HPGL: m_plotFormatOpt->SetSelection( 4 ); break;
165 }
166
167 if( fmt == PLOT_FORMAT::DXF || fmt == PLOT_FORMAT::HPGL )
168 m_plotBackgroundColor->Disable();
169
170 // Set the default line width (pen width which should be used for
171 // items that do not have a pen size defined (like frame ref)
172 // the default line width is stored in mils in config
173 m_defaultLineWidth.SetValue( Mils2iu( cfg->m_Drawing.default_line_thickness ) );
174 }
175
176 // Initialize HPGL specific widgets
178
179 // Plot directory
181 wxString path = settings.m_PlotDirectoryName;
182#ifdef __WINDOWS__
183 path.Replace( '/', '\\' );
184#endif
185 m_outputDirectoryName->SetValue( path );
186}
void setModeColor(bool aColor)
void setPlotDrawingSheet(bool aPlot)
std::vector< COLOR_SETTINGS * > GetColorSettingsList()
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
PLOT_FORMAT
The set of supported output plot formats.
Definition: plotter.h:69

References DXF, SETTINGS_MANAGER::GetColorSettingsList(), EDA_BASE_FRAME::GetSettingsManager(), HPGL, IU_PER_MM, Kiface(), KIFACE_BASE::KifaceSettings(), DIALOG_PLOT_SCHEMATIC_BASE::m_colorTheme, m_defaultLineWidth, m_HPGLPaperSizeSelect, m_HPGLPenSize, DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_parent, m_penWidth, DIALOG_PLOT_SCHEMATIC_BASE::m_plotBackgroundColor, SCHEMATIC_SETTINGS::m_PlotDirectoryName, DIALOG_PLOT_SCHEMATIC_BASE::m_plotFormatOpt, DIALOG_PLOT_SCHEMATIC_BASE::m_plotOriginOpt, path, PDF, POST, SCH_EDIT_FRAME::Schematic(), setModeColor(), setPlotDrawingSheet(), SCHEMATIC::Settings(), UNIT_BINDER::SetValue(), and SVG.

Referenced by DIALOG_PLOT_SCHEMATIC().

◆ IsCtrl()

static bool DIALOG_SHIM::IsCtrl ( int  aChar,
const wxKeyEvent &  e 
)
inlinestaticinherited

Definition at line 128 of file dialog_shim.h.

129 {
130 return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
131 !e.ShiftDown() && !e.MetaDown();
132 }

◆ IsQuasiModal()

◆ IsShiftCtrl()

static bool DIALOG_SHIM::IsShiftCtrl ( int  aChar,
const wxKeyEvent &  e 
)
inlinestaticinherited

Definition at line 134 of file dialog_shim.h.

135 {
136 return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
137 e.ShiftDown() && !e.MetaDown();
138 }

◆ Kiway()

KIWAY & KIWAY_HOLDER::Kiway ( ) const
inlineinherited

Return a reference to the KIWAY that this object has an opportunity to participate in.

A KIWAY_HOLDER is not necessarily a KIWAY_PLAYER.

Definition at line 53 of file kiway_holder.h.

54 {
55 wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
56 return *m_kiway;
57 }

References KIWAY_HOLDER::m_kiway.

Referenced by PROJECT_TREE_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDIT_FRAME::AddLibraryFile(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), SCH_EDIT_FRAME::AskToSaveChanges(), CVPCB_MAINFRAME::BuildLibrariesListBox(), FOOTPRINT_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::CanCloseSymbolFromSchematic(), SCH_EDIT_FRAME::canCloseWindow(), PCB_EDIT_FRAME::canCloseWindow(), KICAD_MANAGER_FRAME::CloseProject(), COMMON_CONTROL::ConfigurePaths(), DIALOG_CHOOSE_SYMBOL::ConstructRightPanel(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), FOOTPRINT_EDITOR_CONTROL::CreateFootprint(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), SCH_EDIT_FRAME::doCloseWindow(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), FIELDS_GRID_TRICKS::doPopupSelection(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), BACK_ANNOTATE::FetchNetlistFromPCB(), PCB_EDIT_FRAME::FetchNetlistFromSchematic(), KICAD_MANAGER_FRAME::ImportNonKiCadProject(), SCRIPTING_TOOL::Init(), EDA_DRAW_FRAME::IsScriptingConsoleVisible(), KIWAY_PLAYER::language_change(), KICAD_MANAGER_FRAME::language_change(), DIALOG_CHANGE_SYMBOLS::launchMatchIdSymbolBrowser(), DIALOG_CHANGE_SYMBOLS::launchNewIdSymbolBrowser(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), PGM_SINGLE_TOP::MacOpenFile(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), PL_EDITOR_FRAME::OnExit(), SCH_EDIT_FRAME::OnExit(), FOOTPRINT_EDIT_FRAME::OnExitKiCad(), SYMBOL_EDIT_FRAME::OnExitKiCad(), FOOTPRINT_VIEWER_FRAME::OnExitKiCad(), SAVE_AS_TRAVERSER::OnFile(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), PCB_EDIT_FRAME::OnNetlistChanged(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), EDA_BASE_FRAME::OnPreferences(), SIM_PLOT_FRAME::onProbe(), PCB_EDIT_FRAME::OnQuit(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_FIELD_PROPERTIES::OnTextValueSelectButtonClick(), SIM_PLOT_FRAME::onTune(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadFootprintFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), FOOTPRINT_EDIT_FRAME::OnUpdateSaveFootprintToBoard(), SCH_BASE_FRAME::PickSymbolFromLibBrowser(), KIWAY_HOLDER::Prj(), SCH_EDIT_TOOL::Properties(), BACK_ANNOTATE::PushNewLinksToPCB(), FOOTPRINT_WIZARD_FRAME::PythonPluginsReload(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SCH_EDITOR_CONTROL::rescueProject(), PCB_EDIT_FRAME::RunEeschema(), EE_INSPECTION_TOOL::RunSimulation(), SYMBOL_EDIT_FRAME::Save(), SYMBOL_EDIT_FRAME::saveCurrentSymbol(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), EDA_DRAW_FRAME::ScriptingConsoleEnableDisable(), PCB_BASE_FRAME::SelectFootprintFromLibBrowser(), PCB_BASE_FRAME::SelectLibrary(), SCH_EDIT_FRAME::SendCrossProbeClearHighlight(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::sendNetlistToCvpcb(), SCH_EDIT_FRAME::SendSelectItems(), SCH_EDIT_FRAME::SetCrossProbeConnection(), SYMBOL_EDIT_FRAME::SetCurSymbol(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), PCB_EDIT_FRAME::ShowFootprintPropertiesDialog(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowLibraryTable(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), PCB_EDIT_FRAME::TestStandalone(), BOARD_EDITOR_CONTROL::UpdateSchematicFromPCB(), DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint(), and DIALOG_SHIM::~DIALOG_SHIM().

◆ OnButton()

void DIALOG_SHIM::OnButton ( wxCommandEvent &  aEvent)
privateinherited

Properly handle the default button events when in the quasimodal mode when not calling EndQuasiModal which is possible with any dialog derived from DIALOG_SHIM.

Definition at line 533 of file dialog_shim.cpp.

534{
535 const int id = aEvent.GetId();
536
537 // If we are pressing a button to exit, we need to enable the escapeID
538 // otherwise the dialog does not process cancel
539 if( id == wxID_CANCEL )
540 SetEscapeId( wxID_ANY );
541
542 if( IsQuasiModal() )
543 {
544 if( id == GetAffirmativeId() )
545 {
546 EndQuasiModal( id );
547 }
548 else if( id == wxID_APPLY )
549 {
550 // Dialogs that provide Apply buttons should make sure data is valid before
551 // allowing a transfer, as there is no other way to indicate failure
552 // (i.e. the dialog can't refuse to close as it might with OK, because it
553 // isn't closing anyway)
554 if( Validate() )
555 {
556 ignore_unused( TransferDataFromWindow() );
557 }
558 }
559 else if( id == GetEscapeId() || (id == wxID_CANCEL && GetEscapeId() == wxID_ANY) )
560 {
561 EndQuasiModal( wxID_CANCEL );
562 }
563 else // not a standard button
564 {
565 aEvent.Skip();
566 }
567
568 return;
569 }
570
571 // This is mandatory to allow wxDialogBase::OnButton() to be called.
572 aEvent.Skip();
573}
void EndQuasiModal(int retCode)
void ignore_unused(const T &)
Definition: ignore.h:24

References DIALOG_SHIM::EndQuasiModal(), ignore_unused(), and DIALOG_SHIM::IsQuasiModal().

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnCharHook()

void DIALOG_SHIM::OnCharHook ( wxKeyEvent &  aEvt)
protectedvirtualinherited

Reimplemented in HK_PROMPT_DIALOG, DIALOG_CHOOSE_SYMBOL, and HTML_MESSAGE_BOX.

Definition at line 576 of file dialog_shim.cpp.

577{
578 if( aEvt.GetKeyCode() == 'U' && aEvt.GetModifiers() == wxMOD_CONTROL )
579 {
580 if( m_parentFrame )
581 {
583 return;
584 }
585 }
586 // shift-return (Mac default) or Ctrl-Return (GTK) for OK
587 else if( aEvt.GetKeyCode() == WXK_RETURN && ( aEvt.ShiftDown() || aEvt.ControlDown() ) )
588 {
589 wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
590 return;
591 }
592 else if( aEvt.GetKeyCode() == WXK_TAB && !aEvt.ControlDown() )
593 {
594 wxWindow* currentWindow = wxWindow::FindFocus();
595 int currentIdx = -1;
596 int delta = aEvt.ShiftDown() ? -1 : 1;
597
598 auto advance =
599 [&]( int& idx )
600 {
601 // Wrap-around modulus
602 int size = m_tabOrder.size();
603 idx = ( ( idx + delta ) % size + size ) % size;
604 };
605
606 for( size_t i = 0; i < m_tabOrder.size(); ++i )
607 {
608 if( m_tabOrder[i] == currentWindow )
609 {
610 currentIdx = (int) i;
611 break;
612 }
613 }
614
615 if( currentIdx >= 0 )
616 {
617 advance( currentIdx );
618
619 //todo: We don't currently have non-textentry dialog boxes but this will break if
620 // we add them.
621#ifdef __APPLE__
622 while( dynamic_cast<wxTextEntry*>( m_tabOrder[ currentIdx ] ) == nullptr )
623 advance( currentIdx );
624#endif
625
626 m_tabOrder[ currentIdx ]->SetFocus();
627 return;
628 }
629 }
630
631 aEvt.Skip();
632}
std::vector< wxWindow * > m_tabOrder
Definition: dialog_shim.h:222
EDA_BASE_FRAME * m_parentFrame
Definition: dialog_shim.h:220
virtual void ToggleUserUnits()
constexpr int delta

References delta, DIALOG_SHIM::m_parentFrame, DIALOG_SHIM::m_tabOrder, and EDA_BASE_FRAME::ToggleUserUnits().

Referenced by DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES(), and DIALOG_TEXTBOX_PROPERTIES::~DIALOG_TEXTBOX_PROPERTIES().

◆ OnCloseWindow()

virtual void DIALOG_PLOT_SCHEMATIC_BASE::OnCloseWindow ( wxCloseEvent &  event)
inlineprotectedvirtualinherited

◆ OnGridEditorHidden()

void DIALOG_SHIM::OnGridEditorHidden ( wxGridEvent &  event)
privateinherited

Definition at line 642 of file dialog_shim.cpp.

643{
644 SetEscapeId( wxID_ANY );
645 event.Skip();
646}

◆ OnGridEditorShown()

void DIALOG_SHIM::OnGridEditorShown ( wxGridEvent &  event)
privateinherited

Definition at line 635 of file dialog_shim.cpp.

636{
637 SetEscapeId( wxID_NONE );
638 event.Skip();
639}

◆ OnModify()

◆ OnOutputDirectoryBrowseClicked()

void DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked ( wxCommandEvent &  event)
overrideprivatevirtual

Set the m_outputDirectoryName variable to the selected directory from directory dialog.

Todo:
Copy of DIALOG_PLOT::OnOutputDirectoryBrowseClicked in dialog_plot.cpp, maybe merge to a common method.

Reimplemented from DIALOG_PLOT_SCHEMATIC_BASE.

Definition at line 193 of file dialog_plot_schematic.cpp.

194{
195 // Build the absolute path of current output directory to preselect it in the file browser.
196 wxString path = ExpandEnvVarSubstitutions( m_outputDirectoryName->GetValue(), &Prj() );
197
198 // When editing a schematic that is not part of a project in the stand alone mode, the
199 // project path is not defined so point to the users document path to save the plot files.
200 if( Prj().IsNullProject() )
201 {
202 path = wxStandardPaths::Get().GetDocumentsDir();
203 }
204 else
205 {
206 // Build the absolute path of current output directory to preselect it in the file browser.
208 path = Prj().AbsolutePath( path );
209 }
210
211 wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );
212
213 if( dirDialog.ShowModal() == wxID_CANCEL )
214 return;
215
216 wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
217
218 wxFileName fn( Prj().AbsolutePath( m_parent->Schematic().Root().GetFileName() ) );
219 wxString defaultPath = fn.GetPathWithSep();
220 wxString msg;
221 wxFileName relPathTest; // Used to test if we can make the path relative
222
223 relPathTest.Assign( dirDialog.GetPath() );
224
225 // Test if making the path relative is possible before asking the user if they want to do it
226 if( relPathTest.MakeRelativeTo( defaultPath ) )
227 {
228 msg.Printf( _( "Do you want to use a path relative to\n'%s'?" ), defaultPath );
229
230 wxMessageDialog dialog( this, msg, _( "Plot Output Directory" ),
231 wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
232
233 if( dialog.ShowModal() == wxID_YES )
234 dirName.MakeRelativeTo( defaultPath );
235 }
236
237 m_outputDirectoryName->SetValue( dirName.GetFullPath() );
238}
virtual const wxString AbsolutePath(const wxString &aFileName) const
Fix up aFileName if it is relative to the project's directory to be an absolute path and filename.
Definition: project.cpp:263
wxString GetFileName() const
Return the filename corresponding to this sheet.
Definition: sch_sheet.h:302

References _, PROJECT::AbsolutePath(), ExpandEnvVarSubstitutions(), SCH_SHEET::GetFileName(), DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_parent, path, KIWAY_HOLDER::Prj(), SCHEMATIC::Root(), and SCH_EDIT_FRAME::Schematic().

◆ OnPageSizeSelected()

void DIALOG_PLOT_SCHEMATIC::OnPageSizeSelected ( wxCommandEvent &  event)
overrideprivatevirtual

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 387 of file dialog_shim.cpp.

388{
390 {
392
393 selectAllInTextCtrls( GetChildren() );
394
397 else
398 KIPLATFORM::UI::ForceFocus( this ); // Focus the dialog itself
399
400 m_firstPaintEvent = false;
401 }
402
403 event.Skip();
404}
bool m_firstPaintEvent
Definition: dialog_shim.h:212
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:213
static void selectAllInTextCtrls(wxWindowList &children)
void FixupCancelButtonCmdKeyCollision(wxWindow *aWindow)
Definition: gtk/ui.cpp:71
void ForceFocus(wxWindow *aWindow)
Pass the current focus to the window.
Definition: gtk/ui.cpp:44

References KIPLATFORM::UI::FixupCancelButtonCmdKeyCollision(), KIPLATFORM::UI::ForceFocus(), DIALOG_SHIM::m_firstPaintEvent, DIALOG_SHIM::m_initialFocusTarget, and selectAllInTextCtrls().

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ OnPlotAll()

void DIALOG_PLOT_SCHEMATIC::OnPlotAll ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_SCHEMATIC_BASE.

Definition at line 381 of file dialog_plot_schematic.cpp.

382{
383 plotSchematic( true );
384}
void plotSchematic(bool aPlotAll)

References plotSchematic().

◆ OnPlotCurrent()

void DIALOG_PLOT_SCHEMATIC::OnPlotCurrent ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_SCHEMATIC_BASE.

Definition at line 375 of file dialog_plot_schematic.cpp.

376{
377 plotSchematic( false );
378}

References plotSchematic().

◆ OnPlotFormatSelection()

virtual void DIALOG_PLOT_SCHEMATIC_BASE::OnPlotFormatSelection ( wxCommandEvent &  event)
inlineprotectedvirtualinherited

◆ OnUpdateUI()

void DIALOG_PLOT_SCHEMATIC::OnUpdateUI ( wxUpdateUIEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_SCHEMATIC_BASE.

Definition at line 264 of file dialog_plot_schematic.cpp.

265{
267
268 if( fmt != m_plotFormat )
269 {
270 m_plotFormat = fmt;
271
272 wxArrayString paperSizes;
273 paperSizes.push_back( _( "Schematic size" ) );
274
275 int selection;
276
277 if( fmt == PLOT_FORMAT::HPGL )
278 {
279 paperSizes.push_back( _( "A5" ) );
280 paperSizes.push_back( _( "A4" ) );
281 paperSizes.push_back( _( "A3" ) );
282 paperSizes.push_back( _( "A2" ) );
283 paperSizes.push_back( _( "A1" ) );
284 paperSizes.push_back( _( "A0" ) );
285 paperSizes.push_back( _( "A" ) );
286 paperSizes.push_back( _( "B" ) );
287 paperSizes.push_back( _( "C" ) );
288 paperSizes.push_back( _( "D" ) );
289 paperSizes.push_back( _( "E" ) );
290
291 selection = m_HPGLPaperSizeSelect;
292 }
293 else
294 {
295 paperSizes.push_back( _( "A4" ) );
296 paperSizes.push_back( _( "A" ) );
297
298 selection = m_pageSizeSelect;
299 }
300
301 m_paperSizeOption->Set( paperSizes );
302 m_paperSizeOption->SetSelection( selection );
303
305 fmt == PLOT_FORMAT::POST || fmt == PLOT_FORMAT::PDF || fmt == PLOT_FORMAT::SVG );
306
307 m_plotOriginTitle->Enable( fmt == PLOT_FORMAT::HPGL );
308 m_plotOriginOpt->Enable( fmt == PLOT_FORMAT::HPGL );
310
311 m_plotBackgroundColor->Enable(
312 fmt == PLOT_FORMAT::POST || fmt == PLOT_FORMAT::PDF || fmt == PLOT_FORMAT::SVG );
313
314 m_colorTheme->Enable( fmt != PLOT_FORMAT::HPGL );
315 m_ModeColorOption->Enable( fmt != PLOT_FORMAT::HPGL );
316 }
317}
void Enable(bool aEnable)
Enable/disable the label, widget and units label.

References _, UNIT_BINDER::Enable(), GetPlotFileFormat(), HPGL, DIALOG_PLOT_SCHEMATIC_BASE::m_colorTheme, m_defaultLineWidth, m_HPGLPaperSizeSelect, DIALOG_PLOT_SCHEMATIC_BASE::m_ModeColorOption, m_pageSizeSelect, DIALOG_PLOT_SCHEMATIC_BASE::m_paperSizeOption, m_penWidth, DIALOG_PLOT_SCHEMATIC_BASE::m_plotBackgroundColor, m_plotFormat, DIALOG_PLOT_SCHEMATIC_BASE::m_plotOriginOpt, DIALOG_PLOT_SCHEMATIC_BASE::m_plotOriginTitle, PDF, POST, and SVG.

◆ plotOneSheetDXF()

bool DIALOG_PLOT_SCHEMATIC::plotOneSheetDXF ( const wxString &  aFileName,
SCH_SCREEN aScreen,
RENDER_SETTINGS aRenderSettings,
const wxPoint &  aPlotOffset,
double  aScale,
bool  aPlotFrameRef 
)
private

Definition at line 536 of file dialog_plot_schematic.cpp.

542{
543 aRenderSettings->LoadColors( getColorSettings() );
544 aRenderSettings->SetDefaultPenWidth( 0 );
545
546 const PAGE_INFO& pageInfo = aScreen->GetPageSettings();
547 DXF_PLOTTER* plotter = new DXF_PLOTTER();
548
549 plotter->SetRenderSettings( aRenderSettings );
550 plotter->SetPageSettings( pageInfo );
551 plotter->SetColorMode( getModeColor() );
552
553 // Currently, plot units are in decimil
554 plotter->SetViewport( aPlotOffset, IU_PER_MILS/10, aScale, false );
555
556 // Init :
557 plotter->SetCreator( wxT( "Eeschema-DXF" ) );
558
559 if( ! plotter->OpenFile( aFileName ) )
560 {
561 delete plotter;
562 return false;
563 }
564
565 LOCALE_IO toggle;
566
567 plotter->StartPlot();
568
569 if( aPlotFrameRef )
570 {
571 wxString sheetName = m_parent->GetCurrentSheet().Last()->GetName();
572 wxString sheetPath = m_parent->GetCurrentSheet().PathHumanReadable();
573
574 PlotDrawingSheet( plotter, &m_parent->Prj(), m_parent->GetTitleBlock(), pageInfo,
575 aScreen->GetPageNumber(), aScreen->GetPageCount(),
576 sheetName, sheetPath, aScreen->GetFileName(),
577 plotter->GetColorMode() ?
579 COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 );
580 }
581
582 aScreen->Plot( plotter );
583
584 // finish
585 plotter->EndPlot();
586 delete plotter;
587
588 return true;
589}
int GetPageCount() const
Definition: base_screen.h:72
int GetVirtualPageNumber() const
Definition: base_screen.h:75
const wxString & GetPageNumber() const
Definition: base_screen.cpp:71
virtual void SetViewport(const VECTOR2I &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the scale/position for the DXF plot.
virtual bool StartPlot() override
Open the DXF plot with a skeleton header.
virtual bool EndPlot() override
void SetDefaultPenWidth(int aWidth)
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
Definition: plotter.cpp:75
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.h:142
RENDER_SETTINGS * RenderSettings()
Definition: plotter.h:140
bool GetColorMode() const
Definition: plotter.h:137
void Plot(PLOTTER *aPlotter) const
Plot all the schematic objects to aPlotter.
wxString PathHumanReadable(bool aUseShortRootName=true) const
Return the sheet path in a human readable form made from the sheet names.
SCH_SHEET * Last() const
Return a pointer to the last SCH_SHEET of the list.
wxString GetName() const
Definition: sch_sheet.h:100
@ BLACK
Definition: color4d.h:44
void PlotDrawingSheet(PLOTTER *plotter, const PROJECT *aProject, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, const wxString &aSheetNumber, int aSheetCount, const wxString &aSheetName, const wxString &aSheetPath, const wxString &aFilename, COLOR4D aColor, bool aIsFirstPage)
@ LAYER_SCHEMATIC_DRAWINGSHEET
Definition: layer_ids.h:381
#define IU_PER_MILS
Definition: plotter.cpp:129

References BLACK, DXF_PLOTTER::EndPlot(), PLOTTER::GetColorMode(), getColorSettings(), SCH_EDIT_FRAME::GetCurrentSheet(), SCH_SCREEN::GetFileName(), KIGFX::RENDER_SETTINGS::GetLayerColor(), getModeColor(), SCH_SHEET::GetName(), BASE_SCREEN::GetPageCount(), BASE_SCREEN::GetPageNumber(), SCH_SCREEN::GetPageSettings(), SCH_BASE_FRAME::GetTitleBlock(), BASE_SCREEN::GetVirtualPageNumber(), IU_PER_MILS, SCH_SHEET_PATH::Last(), LAYER_SCHEMATIC_DRAWINGSHEET, KIGFX::RENDER_SETTINGS::LoadColors(), m_parent, PLOTTER::OpenFile(), SCH_SHEET_PATH::PathHumanReadable(), SCH_SCREEN::Plot(), PlotDrawingSheet(), KIWAY_HOLDER::Prj(), PLOTTER::RenderSettings(), PLOTTER::SetColorMode(), PLOTTER::SetCreator(), KIGFX::RENDER_SETTINGS::SetDefaultPenWidth(), PLOTTER::SetPageSettings(), PLOTTER::SetRenderSettings(), DXF_PLOTTER::SetViewport(), and DXF_PLOTTER::StartPlot().

Referenced by createDXFFiles().

◆ plotOneSheetHpgl()

bool DIALOG_PLOT_SCHEMATIC::plotOneSheetHpgl ( const wxString &  aFileName,
SCH_SCREEN aScreen,
const PAGE_INFO aPageInfo,
RENDER_SETTINGS aRenderSettings,
const wxPoint &  aPlot0ffset,
double  aScale,
bool  aPlotFrameRef,
HPGL_PLOT_ORIGIN_AND_UNITS  aOriginAndUnits 
)
private

Definition at line 706 of file dialog_plot_schematic.cpp.

714{
715 HPGL_PLOTTER* plotter = new HPGL_PLOTTER();
716 // Currently, plot units are in decimil
717
718 plotter->SetPageSettings( aPageInfo );
719 plotter->SetRenderSettings( aRenderSettings );
721 plotter->SetColorMode( getModeColor() );
722 plotter->SetViewport( aPlot0ffset, IU_PER_MILS/10, aScale, false );
723
724 // TODO this could be configurable
725 plotter->SetTargetChordLength( Millimeter2iu( 0.6 ) );
726
727 switch( aOriginAndUnits )
728 {
731 default:
732 plotter->SetUserCoords( false );
733 break;
735 plotter->SetUserCoords( true );
736 plotter->SetUserCoordsFit( false );
737 break;
739 plotter->SetUserCoords( true );
740 plotter->SetUserCoordsFit( true );
741 break;
742 }
743
744 // Init :
745 plotter->SetCreator( wxT( "Eeschema-HPGL" ) );
746
747 if( !plotter->OpenFile( aFileName ) )
748 {
749 delete plotter;
750 return false;
751 }
752
753 LOCALE_IO toggle;
754
755 // Pen num and pen speed are not initialized here.
756 // Default HPGL driver values are used
757 plotter->SetPenDiameter( m_HPGLPenSize );
758 plotter->StartPlot();
759
760 if( aPlotFrameRef )
761 {
762 wxString sheetName = m_parent->GetCurrentSheet().Last()->GetName();
763 wxString sheetPath = m_parent->GetCurrentSheet().PathHumanReadable();
764
765 PlotDrawingSheet( plotter, &m_parent->Prj(), m_parent->GetTitleBlock(), aPageInfo,
766 aScreen->GetPageNumber(), aScreen->GetPageCount(), sheetName, sheetPath,
767 aScreen->GetFileName(), COLOR4D::BLACK,
768 aScreen->GetVirtualPageNumber() == 1 );
769 }
770
771 aScreen->Plot( plotter );
772
773 plotter->EndPlot();
774 delete plotter;
775
776 return true;
777}
void SetUserCoordsFit(bool user_coords_fit)
Set whether the user coordinate system is fit to content.
Definition: plotter_hpgl.h:59
virtual bool StartPlot() override
At the start of the HPGL plot pen speed and number are requested.
void SetTargetChordLength(double chord_len)
Set the target length of chords used to draw approximated circles and arcs.
void SetUserCoords(bool user_coords)
Switch to the user coordinate system.
Definition: plotter_hpgl.h:56
virtual void SetViewport(const VECTOR2I &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
virtual void SetPenDiameter(double diameter)
virtual bool EndPlot() override
HPGL end of plot: sort and emit graphics, pen return and release.
static constexpr int Millimeter2iu(double mm)

References BLACK, HPGL_PLOTTER::EndPlot(), getColorSettings(), SCH_EDIT_FRAME::GetCurrentSheet(), SCH_SCREEN::GetFileName(), getModeColor(), SCH_SHEET::GetName(), BASE_SCREEN::GetPageCount(), BASE_SCREEN::GetPageNumber(), SCH_BASE_FRAME::GetTitleBlock(), BASE_SCREEN::GetVirtualPageNumber(), IU_PER_MILS, SCH_SHEET_PATH::Last(), KIGFX::RENDER_SETTINGS::LoadColors(), m_HPGLPenSize, m_parent, Millimeter2iu(), PLOTTER::OpenFile(), SCH_SHEET_PATH::PathHumanReadable(), SCH_SCREEN::Plot(), PlotDrawingSheet(), PLOTTER_BOT_LEFT, PLOTTER_CENTER, KIWAY_HOLDER::Prj(), PLOTTER::RenderSettings(), PLOTTER::SetColorMode(), PLOTTER::SetCreator(), PLOTTER::SetPageSettings(), HPGL_PLOTTER::SetPenDiameter(), PLOTTER::SetRenderSettings(), HPGL_PLOTTER::SetTargetChordLength(), HPGL_PLOTTER::SetUserCoords(), HPGL_PLOTTER::SetUserCoordsFit(), HPGL_PLOTTER::SetViewport(), HPGL_PLOTTER::StartPlot(), USER_FIT_CONTENT, and USER_FIT_PAGE.

Referenced by createHPGLFiles().

◆ plotOneSheetPDF()

void DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF ( PLOTTER aPlotter,
SCH_SCREEN aScreen,
bool  aPlotDrawingSheet 
)
private

Definition at line 895 of file dialog_plot_schematic.cpp.

897{
898 if( m_plotBackgroundColor->GetValue() && aPlotter->GetColorMode() )
899 {
900 aPlotter->SetColor( aPlotter->RenderSettings()->GetBackgroundColor() );
901 wxPoint end( aPlotter->PageSettings().GetWidthIU(),
902 aPlotter->PageSettings().GetHeightIU() );
903 aPlotter->Rect( wxPoint( 0, 0 ), end, FILL_T::FILLED_SHAPE, 1.0 );
904 }
905
906 if( aPlotDrawingSheet )
907 {
909
910 if( aPlotter->GetColorMode() )
912
913 wxString sheetName = m_parent->GetCurrentSheet().Last()->GetName();
914 wxString sheetPath = m_parent->GetCurrentSheet().PathHumanReadable();
915
916 PlotDrawingSheet( aPlotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(),
918 aScreen->GetPageCount(), sheetName, sheetPath,
919 aScreen->GetFileName(), color, aScreen->GetVirtualPageNumber() == 1 );
920 }
921
922 aScreen->Plot( aPlotter );
923}
int color
Definition: DXF_plotter.cpp:57
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
virtual const COLOR4D & GetBackgroundColor()=0
Return current background color settings.
PAGE_INFO & PageSettings()
Definition: plotter.h:143
virtual void Rect(const VECTOR2I &p1, const VECTOR2I &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH)=0
virtual void SetColor(const COLOR4D &color)=0
PROJECT & Prj() const override
Return a reference to the project this schematic is part of.
Definition: schematic.h:75
const PAGE_INFO & GetPageSettings() const override
SCHEMATIC * Schematic() const
Definition: sch_screen.cpp:92
@ FILLED_SHAPE

References BLACK, color, FILLED_SHAPE, KIGFX::RENDER_SETTINGS::GetBackgroundColor(), PLOTTER::GetColorMode(), SCH_EDIT_FRAME::GetCurrentSheet(), SCH_SCREEN::GetFileName(), KIGFX::RENDER_SETTINGS::GetLayerColor(), SCH_SHEET::GetName(), BASE_SCREEN::GetPageCount(), BASE_SCREEN::GetPageNumber(), SCH_BASE_FRAME::GetPageSettings(), SCH_BASE_FRAME::GetTitleBlock(), BASE_SCREEN::GetVirtualPageNumber(), SCH_SHEET_PATH::Last(), LAYER_SCHEMATIC_DRAWINGSHEET, m_parent, DIALOG_PLOT_SCHEMATIC_BASE::m_plotBackgroundColor, PLOTTER::PageSettings(), SCH_SHEET_PATH::PathHumanReadable(), SCH_SCREEN::Plot(), PlotDrawingSheet(), SCHEMATIC::Prj(), PLOTTER::Rect(), PLOTTER::RenderSettings(), SCH_SCREEN::Schematic(), and PLOTTER::SetColor().

Referenced by createPDFFile().

◆ plotOneSheetPS()

bool DIALOG_PLOT_SCHEMATIC::plotOneSheetPS ( const wxString &  aFileName,
SCH_SCREEN aScreen,
RENDER_SETTINGS aRenderSettings,
const PAGE_INFO aPageInfo,
const wxPoint &  aPlot0ffset,
double  aScale,
bool  aPlotFrameRef 
)
private

Definition at line 1063 of file dialog_plot_schematic.cpp.

1070{
1071 PS_PLOTTER* plotter = new PS_PLOTTER();
1072 plotter->SetRenderSettings( aRenderSettings );
1073 plotter->SetPageSettings( aPageInfo );
1074 plotter->SetColorMode( getModeColor() );
1075
1076 // Currently, plot units are in decimil
1077 plotter->SetViewport( aPlot0ffset, IU_PER_MILS/10, aScale, false );
1078
1079 // Init :
1080 plotter->SetCreator( wxT( "Eeschema-PS" ) );
1081
1082 if( ! plotter->OpenFile( aFileName ) )
1083 {
1084 delete plotter;
1085 return false;
1086 }
1087
1088 LOCALE_IO toggle; // Switch the locale to standard C
1089
1090 plotter->StartPlot();
1091
1092 if( m_plotBackgroundColor->GetValue() && plotter->GetColorMode() )
1093 {
1095 wxPoint end( plotter->PageSettings().GetWidthIU(), plotter->PageSettings().GetHeightIU() );
1096 plotter->Rect( wxPoint( 0, 0 ), end, FILL_T::FILLED_SHAPE, 1.0 );
1097 }
1098
1099 if( aPlotFrameRef )
1100 {
1101 wxString sheetName = m_parent->GetCurrentSheet().Last()->GetName();
1102 wxString sheetPath = m_parent->GetCurrentSheet().PathHumanReadable();
1103
1104 PlotDrawingSheet( plotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(),
1105 aPageInfo, aScreen->GetPageNumber(), aScreen->GetPageCount(),
1106 sheetName, sheetPath, aScreen->GetFileName(),
1107 plotter->GetColorMode() ?
1109 COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 );
1110 }
1111
1112 aScreen->Plot( plotter );
1113
1114 plotter->EndPlot();
1115 delete plotter;
1116
1117 return true;
1118}
virtual void SetColor(const COLOR4D &color) override
The SetColor implementation is split with the subclasses: The PSLIKE computes the rgb values,...
Definition: PS_plotter.cpp:62
virtual bool EndPlot() override
Definition: PS_plotter.cpp:924
virtual bool StartPlot() override
The code within this function (and the CloseFilePS function) creates postscript files whose contents ...
Definition: PS_plotter.cpp:765
virtual void SetViewport(const VECTOR2I &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
Definition: PS_plotter.cpp:384
virtual void Rect(const VECTOR2I &p1, const VECTOR2I &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
Definition: PS_plotter.cpp:546

References BLACK, PS_PLOTTER::EndPlot(), FILLED_SHAPE, PLOTTER::GetColorMode(), SCH_EDIT_FRAME::GetCurrentSheet(), SCH_SCREEN::GetFileName(), KIGFX::RENDER_SETTINGS::GetLayerColor(), getModeColor(), SCH_SHEET::GetName(), BASE_SCREEN::GetPageCount(), BASE_SCREEN::GetPageNumber(), SCH_BASE_FRAME::GetTitleBlock(), BASE_SCREEN::GetVirtualPageNumber(), IU_PER_MILS, SCH_SHEET_PATH::Last(), LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_DRAWINGSHEET, m_parent, DIALOG_PLOT_SCHEMATIC_BASE::m_plotBackgroundColor, PLOTTER::OpenFile(), PLOTTER::PageSettings(), SCH_SHEET_PATH::PathHumanReadable(), SCH_SCREEN::Plot(), PlotDrawingSheet(), SCHEMATIC::Prj(), PS_PLOTTER::Rect(), PLOTTER::RenderSettings(), SCH_SCREEN::Schematic(), PSLIKE_PLOTTER::SetColor(), PLOTTER::SetColorMode(), PLOTTER::SetCreator(), PLOTTER::SetPageSettings(), PLOTTER::SetRenderSettings(), PS_PLOTTER::SetViewport(), and PS_PLOTTER::StartPlot().

Referenced by createPSFiles().

◆ plotOneSheetSVG()

bool DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG ( const wxString &  aFileName,
SCH_SCREEN aScreen,
RENDER_SETTINGS aRenderSettings,
bool  aPlotBlackAndWhite,
bool  aPlotFrameRef 
)
private

Definition at line 1193 of file dialog_plot_schematic.cpp.

1198{
1199 const PAGE_INFO& pageInfo = aScreen->GetPageSettings();
1200
1201 SVG_PLOTTER* plotter = new SVG_PLOTTER();
1202 plotter->SetRenderSettings( aRenderSettings );
1203 plotter->SetPageSettings( pageInfo );
1204 plotter->SetColorMode( aPlotBlackAndWhite ? false : true );
1205 wxPoint plot_offset;
1206 double scale = 1.0;
1207
1208 // Currently, plot units are in decimil
1209 plotter->SetViewport( plot_offset, IU_PER_MILS/10, scale, false );
1210
1211 // Init :
1212 plotter->SetCreator( wxT( "Eeschema-SVG" ) );
1213
1214 if( ! plotter->OpenFile( aFileName ) )
1215 {
1216 delete plotter;
1217 return false;
1218 }
1219
1220 LOCALE_IO toggle;
1221
1222 plotter->StartPlot();
1223
1224 if( m_plotBackgroundColor->GetValue() && plotter->GetColorMode() )
1225 {
1227 wxPoint end( plotter->PageSettings().GetWidthIU(),
1228 plotter->PageSettings().GetHeightIU() );
1229 plotter->Rect( wxPoint( 0, 0 ), end, FILL_T::FILLED_SHAPE, 1.0 );
1230 }
1231
1232 if( aPlotFrameRef )
1233 {
1234 wxString sheetName = m_parent->GetCurrentSheet().Last()->GetName();
1235 wxString sheetPath = m_parent->GetCurrentSheet().PathHumanReadable();
1236
1237 PlotDrawingSheet( plotter, &aScreen->Schematic()->Prj(), m_parent->GetTitleBlock(),
1238 pageInfo, aScreen->GetPageNumber(), aScreen->GetPageCount(),
1239 sheetName, sheetPath, aScreen->GetFileName(),
1240 plotter->GetColorMode() ?
1242 COLOR4D::BLACK, aScreen->GetVirtualPageNumber() == 1 );
1243 }
1244
1245 aScreen->Plot( plotter );
1246
1247 plotter->EndPlot();
1248 delete plotter;
1249
1250 return true;
1251}
virtual bool StartPlot() override
Create SVG file header.
virtual void SetViewport(const VECTOR2I &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
virtual void Rect(const VECTOR2I &p1, const VECTOR2I &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
virtual bool EndPlot() override
virtual void SetColor(const COLOR4D &color) override
The SetColor implementation is split with the subclasses: The PSLIKE computes the rgb values,...

References BLACK, SVG_PLOTTER::EndPlot(), FILLED_SHAPE, PLOTTER::GetColorMode(), SCH_EDIT_FRAME::GetCurrentSheet(), SCH_SCREEN::GetFileName(), KIGFX::RENDER_SETTINGS::GetLayerColor(), SCH_SHEET::GetName(), BASE_SCREEN::GetPageCount(), BASE_SCREEN::GetPageNumber(), SCH_SCREEN::GetPageSettings(), SCH_BASE_FRAME::GetTitleBlock(), BASE_SCREEN::GetVirtualPageNumber(), IU_PER_MILS, SCH_SHEET_PATH::Last(), LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_DRAWINGSHEET, m_parent, DIALOG_PLOT_SCHEMATIC_BASE::m_plotBackgroundColor, PLOTTER::OpenFile(), PLOTTER::PageSettings(), SCH_SHEET_PATH::PathHumanReadable(), SCH_SCREEN::Plot(), PlotDrawingSheet(), SCHEMATIC::Prj(), SVG_PLOTTER::Rect(), PLOTTER::RenderSettings(), scale, SCH_SCREEN::Schematic(), SVG_PLOTTER::SetColor(), PLOTTER::SetColorMode(), PLOTTER::SetCreator(), PLOTTER::SetPageSettings(), PLOTTER::SetRenderSettings(), SVG_PLOTTER::SetViewport(), and SVG_PLOTTER::StartPlot().

Referenced by createSVGFiles().

◆ plotSchematic()

void DIALOG_PLOT_SCHEMATIC::plotSchematic ( bool  aPlotAll)
private

Definition at line 387 of file dialog_plot_schematic.cpp.

388{
390
391 getPlotOptions( &renderSettings );
392
393 switch( GetPlotFileFormat() )
394 {
395 default:
397 createPSFiles( aPlotAll, getPlotDrawingSheet(), &renderSettings );
398 break;
399 case PLOT_FORMAT::DXF:
400 createDXFFiles( aPlotAll, getPlotDrawingSheet(), &renderSettings );
401 break;
402 case PLOT_FORMAT::PDF:
403 createPDFFile( aPlotAll, getPlotDrawingSheet(), &renderSettings );
404 break;
405 case PLOT_FORMAT::SVG:
406 createSVGFiles( aPlotAll, getPlotDrawingSheet(), &renderSettings );
407 break;
409 createHPGLFiles( aPlotAll, getPlotDrawingSheet(), &renderSettings );
410 break;
411 }
412}
void createDXFFiles(bool aPlotAll, bool aPlotDrawingSheet, RENDER_SETTINGS *aRenderSettings)
void createSVGFiles(bool aPrintAll, bool aPrintFrameRef, RENDER_SETTINGS *aRenderSettings)
void createPSFiles(bool aPlotAll, bool aPlotFrameRef, RENDER_SETTINGS *aSettings)
void createHPGLFiles(bool aPlotAll, bool aPlotFrameRef, RENDER_SETTINGS *aRenderSettings)
void getPlotOptions(RENDER_SETTINGS *aSettings)
void createPDFFile(bool aPlotAll, bool aPlotDrawingSheet, RENDER_SETTINGS *aRenderSettings)
Store schematic specific render settings.
Definition: sch_painter.h:71
KIGFX::SCH_RENDER_SETTINGS * GetRenderSettings()

References createDXFFiles(), createHPGLFiles(), createPDFFile(), createPSFiles(), createSVGFiles(), DXF, getPlotDrawingSheet(), GetPlotFileFormat(), getPlotOptions(), SCH_BASE_FRAME::GetRenderSettings(), HPGL, m_parent, PDF, POST, and SVG.

Referenced by OnPlotAll(), and OnPlotCurrent().

◆ Prj()

PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

Return a reference to the PROJECT associated with this KIWAY.

Definition at line 36 of file kiway_holder.cpp.

37{
38 return Kiway().Prj();
39}
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
Definition: kiway_holder.h:53
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Definition: kiway.cpp:192

References KIWAY_HOLDER::Kiway(), and KIWAY::Prj().

Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries(), FP_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_LIBRARY_MANAGER::addLibrary(), PCB_BASE_EDIT_FRAME::AddLibrary(), SYMBOL_EDIT_FRAME::addLibTableEntry(), SCH_EDIT_FRAME::AppendSchematic(), AskSaveBoardFileName(), DIALOG_SYMBOL_REMAP::backupProject(), CVPCB_MAINFRAME::buildEquivalenceList(), CVPCB_MAINFRAME::BuildLibrariesListBox(), FOOTPRINT_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::buildSaveAsDialog(), SIM_PLOT_FRAME::canCloseWindow(), PANEL_FP_PROPERTIES_3D_MODEL::Cfg3DPath(), KICAD_MANAGER_FRAME::CloseProject(), PCB_BASE_EDIT_FRAME::createNewLibrary(), PCB_BASE_EDIT_FRAME::CreateNewProjectLibrary(), createPDFFile(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SCH_EDIT_FRAME::CreateScreens(), FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_NETLIST_IMPORT::DIALOG_NETLIST_IMPORT(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PLOT::DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), FOOTPRINT_PREVIEW_PANEL::DisplayFootprint(), SYMBOL_VIEWER_FRAME::DisplayLibInfos(), CVPCB_MAINFRAME::DisplayStatus(), SCH_EDIT_FRAME::doAutoSave(), PCB_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::doCloseWindow(), FOOTPRINT_EDIT_FRAME::doCloseWindow(), PCB_BASE_EDIT_FRAME::doCloseWindow(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), FIELDS_GRID_TRICKS::doPopupSelection(), FOOTPRINT_EDIT_FRAME::DuplicateFootprint(), KICAD_MANAGER_CONTROL::Execute(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::ExportFootprintsToLibrary(), BOARD_EDITOR_CONTROL::ExportNetlist(), SYMBOL_EDITOR_CONTROL::ExportSymbolAsSVG(), SYMBOL_EDITOR_CONTROL::ExportView(), PCB_EDIT_FRAME::ExportVRML_File(), BACK_ANNOTATE::FetchNetlistFromPCB(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), SYMBOL_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), SIM_PLOT_FRAME::getDefaultFilename(), SIM_PLOT_FRAME::getDefaultPath(), PCB_BASE_EDIT_FRAME::GetDesignRulesPath(), DISPLAY_FOOTPRINTS_FRAME::GetFootprint(), PCB_EDIT_FRAME::GetLastPath(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), SCH_BASE_FRAME::GetLibSymbol(), getOutputPath(), KICAD_MANAGER_FRAME::GetProjectFileName(), SCH_EDIT_FRAME::GetSchematicJunctionSize(), SYMBOL_VIEWER_FRAME::GetSelectedSymbol(), SCH_EDIT_FRAME::importFile(), SCH_EDITOR_CONTROL::ImportFPAssignments(), DIALOG_CONFIG_EQUFILES::Init(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), SCH_EDIT_FRAME::KiwayMailIn(), SYMBOL_EDIT_FRAME::KiwayMailIn(), FOOTPRINT_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), PCB_BASE_FRAME::loadFootprint(), CVPCB_MAINFRAME::LoadFootprintFiles(), PCB_EDIT_FRAME::LoadFootprints(), SCH_EDIT_FRAME::LoadProject(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProjectSettings(), PCB_EDIT_FRAME::LoadProjectSettings(), SIM_PLOT_FRAME::LoadSettings(), SCH_EDIT_FRAME::LoadSheetFromFile(), SYMBOL_EDIT_FRAME::LoadSymbolFromCurrentLib(), EDA_BASE_FRAME::LoadWindowState(), SIM_PLOT_FRAME::loadWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbookAs(), PANEL_FP_PROPERTIES_3D_MODEL::On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), DIALOG_BOARD_SETUP::OnAuxiliaryAction(), PCB_EDIT_FRAME::onBoardLoaded(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), DIALOG_NETLIST_IMPORT::onBrowseNetlistFiles(), WX_HTML_REPORT_PANEL::onBtnSaveToFile(), TEXT_BUTTON_URL::OnButtonClick(), TEXT_BUTTON_FILE_BROWSER::OnButtonClick(), DIALOG_EDIT_SYMBOLS_LIBID::onClickOrphansButton(), DIALOG_SYMBOL_FIELDS_TABLE::OnExport(), DIALOG_EXPORT_STEP::onExportButton(), DIALOG_GENDRILL::OnGenReportFile(), KICAD_MANAGER_FRAME::OnIdle(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_SYMBOL::OnInitDialog(), DIALOG_CONFIG_EQUFILES::OnOkClick(), SCH_EDIT_FRAME::OnOpenCvpcb(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), SCH_EDIT_FRAME::OnOpenPcbnew(), OnOutputDirectoryBrowseClicked(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_SCHEMATIC_SETUP::OnPageChanged(), DIALOG_BOARD_SETUP::OnPageChanged(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_ERC::OnSaveReport(), DIALOG_DRC::OnSaveReport(), DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded(), DIALOG_TEXT_PROPERTIES::onScintillaCharAdded(), PROPERTIES_FRAME::onScintillaCharAdded(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), SCH_EDITOR_CONTROL::Paste(), FOOTPRINT_EDITOR_CONTROL::PasteFootprint(), SCH_BASE_FRAME::PickSymbolFromLibTree(), SYMBOL_EDITOR_CONTROL::PinLibrary(), FOOTPRINT_EDITOR_CONTROL::PinLibrary(), plotOneSheetDXF(), plotOneSheetHpgl(), DIALOG_CHOOSE_SYMBOL::PopulateFootprintSelector(), SCH_EDITOR_CONTROL::Print(), EDA_DRAW_FRAME::PrintDrawingSheet(), SCH_EDIT_FRAME::PrintPage(), KICAD_MANAGER_FRAME::PrintPrjInfo(), CVPCB_MAINFRAME::readNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), SYMBOL_VIEWER_FRAME::ReCreateLibList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), SYMBOL_VIEWER_FRAME::ReCreateSymbolList(), PANEL_FP_PROPERTIES_3D_MODEL::ReloadModelsFromFootprint(), EDA_3D_VIEWER_FRAME::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), FOOTPRINT_EDITOR_CONTROL::RenameFootprint(), SYMBOL_EDIT_FRAME::replaceLibTableEntry(), SCH_EDITOR_CONTROL::RescueLegacyProject(), SCH_EDITOR_CONTROL::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), PCB_EDIT_FRAME::RunEeschema(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), SYMBOL_EDIT_FRAME::saveLibrary(), PCB_EDIT_FRAME::SavePcbFile(), SCH_EDIT_FRAME::SaveProject(), PCB_EDIT_FRAME::SaveProjectSettings(), DIALOG_BOARD_STATISTICS::saveReportClicked(), SCH_EDIT_FRAME::saveSchematicFile(), EDA_BASE_FRAME::SaveSettings(), SIM_PLOT_FRAME::SaveSettings(), SCH_BASE_FRAME::saveSymbolLibTables(), SIM_PLOT_FRAME::saveWorkbook(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), PCB_BASE_FRAME::SelectLibrary(), SYMBOL_EDIT_FRAME::SelectLibraryFromList(), PCB_BASE_EDIT_FRAME::selectLibTable(), SYMBOL_EDIT_FRAME::selectSymLibTable(), PCB_EDIT_FRAME::SetBoard(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), SYMBOL_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), SYMBOL_EDIT_FRAME::SetCurSymbol(), PCB_EDIT_FRAME::SetLastPath(), GERBVIEW_FRAME::SetPageSettings(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), EE_INSPECTION_TOOL::ShowDatasheet(), DIALOG_CHOOSE_SYMBOL::ShowFootprintFor(), COMMON_CONTROL::ShowHelp(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SYMBOL_VIEWER_FRAME::ShowModal(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SYMBOL_LIBRARY_MANAGER::symTable(), FP_TREE_SYNCHRONIZING_ADAPTER::Sync(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER_FRAME::takeScreenshot(), PCB_EDIT_FRAME::TestStandalone(), DIALOG_EDIT_SYMBOLS_LIBID::TransferDataFromWindow(), NETLIST_DIALOG::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataToWindow(), SYMBOL_EDITOR_CONTROL::UnpinLibrary(), FOOTPRINT_EDITOR_CONTROL::UnpinLibrary(), SCH_EDIT_FRAME::updateAutoSaveFile(), DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample(), SCH_EDIT_FRAME::UpdateTitle(), SIM_PLOT_FRAME::updateTitle(), FOOTPRINT_EDIT_FRAME::UpdateTitle(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_PROPERTIES::~DIALOG_FOOTPRINT_PROPERTIES(), EDA_3D_VIEWER_FRAME::~EDA_3D_VIEWER_FRAME(), PANEL_FP_PROPERTIES_3D_MODEL::~PANEL_FP_PROPERTIES_3D_MODEL(), and SCH_EDIT_FRAME::~SCH_EDIT_FRAME().

◆ PrjConfigChanged()

bool DIALOG_PLOT_SCHEMATIC::PrjConfigChanged ( )
inline

Return true if the project configuration was modified.

Definition at line 68 of file dialog_plot_schematic.h.

68{ return m_configChanged; }

References m_configChanged.

Referenced by SCH_EDITOR_CONTROL::Plot().

◆ resetSize()

void DIALOG_SHIM::resetSize ( )
protectedinherited

Clear the existing dialog size and position.

This will cause the dialog size to be clear so the next time the dialog is shown the sizers will layout the dialog accordingly. This useful when there are dialog windows that size changes due to layout dependency hidden controls.

Definition at line 294 of file dialog_shim.cpp.

295{
296 const char* hash_key;
297
298 if( m_hash_key.size() )
299 {
300 // a special case like EDA_LIST_DIALOG, which has multiple uses.
301 hash_key = m_hash_key.c_str();
302 }
303 else
304 {
305 hash_key = typeid(*this).name();
306 }
307
308 std::unordered_map<std::string, wxRect>::iterator it = class_map.find( hash_key );
309
310 if( it == class_map.end() )
311 return;
312
313 wxRect rect = it->second;
314 rect.SetSize( wxSize( 0, 0 ) );
315 class_map[ hash_key ] = rect;
316}
std::string m_hash_key
Definition: dialog_shim.h:203
static std::unordered_map< std::string, wxRect > class_map

References class_map, and DIALOG_SHIM::m_hash_key.

Referenced by DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES().

◆ restoreEnvironment()

void DIALOG_PLOT_SCHEMATIC::restoreEnvironment ( PDF_PLOTTER aPlotter,
SCH_SHEET_PATH aOldsheetpath 
)
private

Everything done, close the plot and restore the environment.

Parameters
aPlotterthe plotter to close and destroy
aOldsheetpaththe stored old sheet path for the current sheet before the plot started

Definition at line 882 of file dialog_plot_schematic.cpp.

884{
885 aPlotter->EndPlot();
886 delete aPlotter;
887
888 // Restore the previous sheet
889 m_parent->SetCurrentSheet( aOldsheetpath );
892}
virtual bool EndPlot() override

References PDF_PLOTTER::EndPlot(), SCH_EDIT_FRAME::GetCurrentSheet(), m_parent, SCH_EDIT_FRAME::SetCurrentSheet(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), and SCH_SHEET_PATH::UpdateAllScreenReferences().

Referenced by createPDFFile().

◆ setHpglPenWidth()

void DIALOG_PLOT_SCHEMATIC::setHpglPenWidth ( )
private

Definition at line 592 of file dialog_plot_schematic.cpp.

593{
595
596 if( m_HPGLPenSize > Millimeter2iu( 2 ) )
598
599 if( m_HPGLPenSize < Millimeter2iu( 0.01 ) )
601}

References UNIT_BINDER::GetValue(), m_HPGLPenSize, m_penWidth, and Millimeter2iu().

Referenced by createHPGLFiles().

◆ SetInitialFocus()

void DIALOG_SHIM::SetInitialFocus ( wxWindow *  aWindow)
inlineinherited

Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.

Definition at line 97 of file dialog_shim.h.

98 {
99 m_initialFocusTarget = aWindow;
100 }

References DIALOG_SHIM::m_initialFocusTarget.

Referenced by FOOTPRINT_EDIT_FRAME::buildSaveAsDialog(), SYMBOL_EDIT_FRAME::buildSaveAsDialog(), DIALOG_BOM::DIALOG_BOM(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_FIND::DIALOG_FIND(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GET_FOOTPRINT_BY_NAME::DIALOG_GET_FOOTPRINT_BY_NAME(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES(), DIALOG_LINE_PROPERTIES::DIALOG_LINE_PROPERTIES(), DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_SCH_FIND::DIALOG_SCH_FIND(), DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_WIRE_BUS_PROPERTIES::DIALOG_WIRE_BUS_PROPERTIES(), EDA_VIEW_SWITCHER::EDA_VIEW_SWITCHER(), HK_PROMPT_DIALOG::HK_PROMPT_DIALOG(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchAllClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchIDClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchRefClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchSelectedClicked(), DIALOG_EXCHANGE_FOOTPRINTS::OnMatchValueClicked(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), DIALOG_COPPER_ZONE::TransferDataToWindow(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), DIALOG_RULE_AREA_PROPERTIES::TransferDataToWindow(), and WX_TEXT_ENTRY_DIALOG::WX_TEXT_ENTRY_DIALOG().

◆ SetKiway()

void KIWAY_HOLDER::SetKiway ( wxWindow *  aDest,
KIWAY aKiway 
)
inherited

It is only used for debugging, since "this" is not a wxWindow*.

"this" is a KIWAY_HOLDER mix-in.

Parameters
aDestis the recipient of aKiway pointer.
aKiwayis often from a parent window or from KIFACE::CreateWindow().

Definition at line 43 of file kiway_holder.cpp.

44{
45#if defined(DEBUG)
46 // offer a trap point for debugging most any window
47 wxASSERT( aDest );
48 if( !strcmp( typeid(aDest).name(), "DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB" ) )
49 {
50 int breakhere=1;
51 ignore_unused( breakhere );
52 }
53#endif
54
55 ignore_unused( aDest );
56
57 m_kiway = aKiway;
58}
const char * name
Definition: DXF_plotter.cpp:56

References ignore_unused(), KIWAY_HOLDER::m_kiway, and name.

Referenced by BM2CMP_FRAME::BM2CMP_FRAME(), PCB::IFACE::CreateWindow(), InvokePcbLibTableEditor(), InvokeSchEditSymbolLibTable(), PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

◆ setModeColor()

void DIALOG_PLOT_SCHEMATIC::setModeColor ( bool  aColor)
inlineprivate

Definition at line 83 of file dialog_plot_schematic.h.

83{ m_ModeColorOption->SetSelection( aColor ? 0 : 1 ); }

References DIALOG_PLOT_SCHEMATIC_BASE::m_ModeColorOption.

Referenced by initDlg().

◆ setPlotDrawingSheet()

void DIALOG_PLOT_SCHEMATIC::setPlotDrawingSheet ( bool  aPlot)
inlineprivate

Definition at line 95 of file dialog_plot_schematic.h.

95{ m_plotDrawingSheet->SetValue( aPlot ); }

References DIALOG_PLOT_SCHEMATIC_BASE::m_plotDrawingSheet.

Referenced by initDlg().

◆ setPlotOriginAndUnits()

void DIALOG_PLOT_SCHEMATIC::setPlotOriginAndUnits ( HPGL_PLOT_ORIGIN_AND_UNITS  aOriginAndUnits)
inlineprivate

Definition at line 131 of file dialog_plot_schematic.h.

132 {
133 switch( aOriginAndUnits )
134 {
136 default:
137 m_plotOriginOpt->SetSelection( 0 );
138 break;
139
141 m_plotOriginOpt->SetSelection( 1 );
142 break;
143
145 m_plotOriginOpt->SetSelection( 2 );
146 break;
147
149 m_plotOriginOpt->SetSelection( 3 );
150 break;
151 }
152 }

References DIALOG_PLOT_SCHEMATIC_BASE::m_plotOriginOpt, PLOTTER_BOT_LEFT, PLOTTER_CENTER, USER_FIT_CONTENT, and USER_FIT_PAGE.

◆ SetPosition()

void DIALOG_SHIM::SetPosition ( const wxPoint &  aNewPosition)
inherited

Force the position of the dialog to a new position.

Parameters
aNewPositionis the new forced position

Definition at line 197 of file dialog_shim.cpp.

198{
199 wxDialog::SetPosition( aNewPosition );
200
201 // Now update the stored position:
202 const char* hash_key;
203
204 if( m_hash_key.size() )
205 {
206 // a special case like EDA_LIST_DIALOG, which has multiple uses.
207 hash_key = m_hash_key.c_str();
208 }
209 else
210 {
211 hash_key = typeid(*this).name();
212 }
213
214 std::unordered_map<std::string, wxRect>::iterator it = class_map.find( hash_key );
215
216 if( it == class_map.end() )
217 return;
218
219 wxRect rect = it->second;
220 rect.SetPosition( aNewPosition );
221
222 class_map[ hash_key ] = rect;
223}
void SetPosition(const wxString &aStr, const wxString &aDefaultMeasurementUnit, int *aX, int *aY, const wxString &aActualConversion)

References class_map, DIALOG_SHIM::m_hash_key, and PCAD2KICAD::SetPosition().

Referenced by PCB_BASE_FRAME::SelectOneLayer().

◆ setSizeInDU()

void DIALOG_SHIM::setSizeInDU ( int  x,
int  y 
)
protectedinherited

Set the dialog to the given dimensions in "dialog units".

These are units equivalent to 4* the average character width and 8* the average character height, allowing a dialog to be sized in a way that scales it with the system font.

Definition at line 169 of file dialog_shim.cpp.

170{
171 wxSize sz( x, y );
172 SetSize( ConvertDialogToPixels( sz ) );
173}

Referenced by DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), HTML_MESSAGE_BOX::HTML_MESSAGE_BOX(), and HTML_MESSAGE_BOX::SetDialogSizeInDU().

◆ setupPlotPagePDF()

void DIALOG_PLOT_SCHEMATIC::setupPlotPagePDF ( PLOTTER aPlotter,
SCH_SCREEN aScreen 
)
private

Definition at line 926 of file dialog_plot_schematic.cpp.

927{
928 PAGE_INFO plotPage; // page size selected to plot
929
930 // Considerations on page size and scaling requests
931 const PAGE_INFO& actualPage = aScreen->GetPageSettings(); // page size selected in schematic
932
933 switch( m_pageSizeSelect )
934 {
935 case PAGE_SIZE_A:
936 plotPage.SetType( wxT( "A" ) );
937 plotPage.SetPortrait( actualPage.IsPortrait() );
938 break;
939
940 case PAGE_SIZE_A4:
941 plotPage.SetType( wxT( "A4" ) );
942 plotPage.SetPortrait( actualPage.IsPortrait() );
943 break;
944
945 case PAGE_SIZE_AUTO:
946 default:
947 plotPage = actualPage;
948 break;
949 }
950
951 double scalex = (double) plotPage.GetWidthMils() / actualPage.GetWidthMils();
952 double scaley = (double) plotPage.GetHeightMils() / actualPage.GetHeightMils();
953 double scale = std::min( scalex, scaley );
954 aPlotter->SetPageSettings( plotPage );
955
956 // Currently, plot units are in decimil
957 aPlotter->SetViewport( wxPoint( 0, 0 ), IU_PER_MILS/10, scale, false );
958}
virtual void SetViewport(const VECTOR2I &aOffset, double aIusPerDecimil, double aScale, bool aMirror)=0
Set the plot offset and scaling for the current plot.

References PAGE_INFO::GetHeightMils(), SCH_SCREEN::GetPageSettings(), PAGE_INFO::GetWidthMils(), PAGE_INFO::IsPortrait(), IU_PER_MILS, m_pageSizeSelect, PAGE_SIZE_A, PAGE_SIZE_A4, PAGE_SIZE_AUTO, scale, PLOTTER::SetPageSettings(), PAGE_INFO::SetPortrait(), PAGE_INFO::SetType(), and PLOTTER::SetViewport().

Referenced by createPDFFile().

◆ SetupStandardButtons()

void DIALOG_SHIM::SetupStandardButtons ( std::map< int, wxString >  aLabels = {})
inherited

Definition at line 709 of file dialog_shim.cpp.

710{
711 recursiveDescent( GetSizer(), aLabels );
712}
static void recursiveDescent(wxSizer *aSizer, std::map< int, wxString > &aLabels)

References recursiveDescent().

Referenced by CONVERT_SETTINGS_DIALOG::CONVERT_SETTINGS_DIALOG(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOM::DIALOG_BOM(), DIALOG_BUS_MANAGER::DIALOG_BUS_MANAGER(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL(), DIALOG_CLEANUP_GRAPHICS::DIALOG_CLEANUP_GRAPHICS(), DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_CREATE_ARRAY::DIALOG_CREATE_ARRAY(), DIALOG_DIELECTRIC_MATERIAL::DIALOG_DIELECTRIC_MATERIAL(), DIALOG_DIMENSION_PROPERTIES::DIALOG_DIMENSION_PROPERTIES(), DIALOG_DRC::DIALOG_DRC(), DIALOG_ERC::DIALOG_ERC(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_3DFILE::DIALOG_EXPORT_3DFILE(), DIALOG_EXPORT_IDF3::DIALOG_EXPORT_IDF3(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FILTER_SELECTION::DIALOG_FILTER_SELECTION(), DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION(), DIALOG_GENDRILL::DIALOG_GENDRILL(), DIALOG_GET_FOOTPRINT_BY_NAME::DIALOG_GET_FOOTPRINT_BY_NAME(), DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS(), DIALOG_GLOBAL_LIB_TABLE_CONFIG::DIALOG_GLOBAL_LIB_TABLE_CONFIG(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMAGE_PROPERTIES::DIALOG_IMAGE_PROPERTIES(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_IMPORT_SETTINGS::DIALOG_IMPORT_SETTINGS(), DIALOG_IMPORTED_LAYERS::DIALOG_IMPORTED_LAYERS(), DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS(), DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE(), DIALOG_LIB_NEW_SYMBOL::DIALOG_LIB_NEW_SYMBOL(), DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES(), DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES(), DIALOG_LINE_PROPERTIES::DIALOG_LINE_PROPERTIES(), DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY(), DIALOG_MIGRATE_SETTINGS::DIALOG_MIGRATE_SETTINGS(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NET_INSPECTOR::DIALOG_NET_INSPECTOR(), DIALOG_NETLIST_IMPORT::DIALOG_NETLIST_IMPORT(), DIALOG_NON_COPPER_ZONES_EDITOR::DIALOG_NON_COPPER_ZONES_EDITOR(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PRIMITIVES_TRANSFORM::DIALOG_PAD_PRIMITIVES_TRANSFORM(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PCM::DIALOG_PCM(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_PLOT::DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC(), DIALOG_PNS_DIFF_PAIR_DIMENSIONS::DIALOG_PNS_DIFF_PAIR_DIMENSIONS(), DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_PRINT_GENERIC::DIALOG_PRINT_GENERIC(), DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER(), DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES(), DIALOG_REGULATOR_FORM::DIALOG_REGULATOR_FORM(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_RULE_AREA_PROPERTIES::DIALOG_RULE_AREA_PROPERTIES(), DIALOG_SCH_IMPORT_SETTINGS::DIALOG_SCH_IMPORT_SETTINGS(), DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES(), DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES(), DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES(), DIALOG_SIM_SETTINGS::DIALOG_SIM_SETTINGS(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), DIALOG_UPDATE_SYMBOL_FIELDS::DIALOG_UPDATE_SYMBOL_FIELDS(), DIALOG_WIRE_BUS_PROPERTIES::DIALOG_WIRE_BUS_PROPERTIES(), EDA_LIST_DIALOG::EDA_LIST_DIALOG(), DIALOG_CONSTRAINTS_REPORTER::FinishInitialization(), HTML_MESSAGE_BOX::HTML_MESSAGE_BOX(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG::NETLIST_DIALOG(), NETLIST_DIALOG_ADD_GENERATOR::NETLIST_DIALOG_ADD_GENERATOR(), PAGED_DIALOG::PAGED_DIALOG(), DIALOG_CLEANUP_TRACKS_AND_VIAS::setupOKButtonLabel(), WX_TEXT_ENTRY_DIALOG::WX_TEXT_ENTRY_DIALOG(), and WX_UNIT_ENTRY_DIALOG::WX_UNIT_ENTRY_DIALOG().

◆ Show()

bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 226 of file dialog_shim.cpp.

227{
228 bool ret;
229 const char* hash_key;
230
231 if( m_hash_key.size() )
232 {
233 // a special case like EDA_LIST_DIALOG, which has multiple uses.
234 hash_key = m_hash_key.c_str();
235 }
236 else
237 {
238 hash_key = typeid(*this).name();
239 }
240
241 // Show or hide the window. If hiding, save current position and size.
242 // If showing, use previous position and size.
243 if( show )
244 {
245#ifndef __WINDOWS__
246 wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
247#endif
248 ret = wxDialog::Show( show );
249
250 // classname is key, returns a zeroed out default EDA_RECT if none existed before.
251 wxRect savedDialogRect = class_map[ hash_key ];
252
253 if( savedDialogRect.GetSize().x != 0 && savedDialogRect.GetSize().y != 0 )
254 {
256 {
257 SetSize( savedDialogRect.GetPosition().x, savedDialogRect.GetPosition().y,
258 wxDialog::GetSize().x, wxDialog::GetSize().y, 0 );
259 }
260 else
261 {
262 SetSize( savedDialogRect.GetPosition().x, savedDialogRect.GetPosition().y,
263 std::max( wxDialog::GetSize().x, savedDialogRect.GetSize().x ),
264 std::max( wxDialog::GetSize().y, savedDialogRect.GetSize().y ),
265 0 );
266 }
267 }
268 else if( m_initialSize != wxDefaultSize )
269 SetSize( m_initialSize );
270
271 // Be sure that the dialog appears in a visible area
272 // (the dialog position might have been stored at the time when it was
273 // shown on another display)
274 if( wxDisplay::GetFromWindow( this ) == wxNOT_FOUND )
275 Centre();
276 }
277 else
278 {
279 // Save the dialog's position & size before hiding, using classname as key
280 class_map[ hash_key ] = wxRect( wxDialog::GetPosition(), wxDialog::GetSize() );
281
282#ifdef __WXMAC__
283 if ( m_eventLoop )
284 m_eventLoop->Exit( GetReturnCode() ); // Needed for APP-MODAL dlgs on OSX
285#endif
286
287 ret = wxDialog::Show( show );
288 }
289
290 return ret;
291}
bool m_useCalculatedSize
Definition: dialog_shim.h:207
wxSize m_initialSize
Definition: dialog_shim.h:225

References class_map, DIALOG_SHIM::m_hash_key, DIALOG_SHIM::m_initialSize, and DIALOG_SHIM::m_useCalculatedSize.

Referenced by FOOTPRINT_EDITOR_CONTROL::CheckFootprint(), EE_INSPECTION_TOOL::CrossProbe(), DRC_TOOL::CrossProbe(), DIALOG_SHIM::EndQuasiModal(), GROUP_TOOL::GroupProperties(), EE_INSPECTION_TOOL::NextMarker(), DRC_TOOL::NextMarker(), SCH_EDIT_FRAME::OnAnnotate(), DIALOG_DRC::OnDRCItemDClick(), DIALOG_ERC::OnERCItemDClick(), DIALOG_CLEANUP_GRAPHICS::OnLeftDClickItem(), DIALOG_CLEANUP_TRACKS_AND_VIAS::OnLeftDClickItem(), DIALOG_FOOTPRINT_CHECKER::OnLeftDClickItem(), GROUP_TOOL::PickNewMember(), EE_INSPECTION_TOOL::PrevMarker(), DRC_TOOL::PrevMarker(), CVPCB_MAINFRAME::readNetListAndFpFiles(), DIALOG_PAD_PROPERTIES::Show(), EDA_VIEW_SWITCHER::Show(), DIALOG_FIND::Show(), DRC_TOOL::ShowDRCDialog(), EE_INSPECTION_TOOL::ShowERCDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), HTML_MESSAGE_BOX::ShowModeless(), DIALOG_SHIM::ShowQuasiModal(), and DIALOG_POSITION_RELATIVE::UpdateAnchor().

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 437 of file dialog_shim.cpp.

438{
439 // This is an exception safe way to zero a pointer before returning.
440 // Yes, even though DismissModal() clears this first normally, this is
441 // here in case there's an exception before the dialog is dismissed.
442 struct NULLER
443 {
444 void*& m_what;
445 NULLER( void*& aPtr ) : m_what( aPtr ) {}
446 ~NULLER() { m_what = nullptr; } // indeed, set it to NULL on destruction
447 } clear_this( (void*&) m_qmodal_loop );
448
449 // release the mouse if it's currently captured as the window having it
450 // will be disabled when this dialog is shown -- but will still keep the
451 // capture making it impossible to do anything in the modal dialog itself
452 wxWindow* win = wxWindow::GetCapture();
453 if( win )
454 win->ReleaseMouse();
455
456 // Get the optimal parent
457 wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
458
459 wxASSERT_MSG( !m_qmodal_parent_disabler, wxT( "Caller using ShowQuasiModal() twice on same "
460 "window?" ) );
461
462 // quasi-modal: disable only my "optimal" parent
464
465 // Apple in its infinite wisdom will raise a disabled window before even passing
466 // us the event, so we have no way to stop it. Instead, we must set an order on
467 // the windows so that the quasi-modal will be pushed in front of the disabled
468 // window when it is raised.
470
471 Show( true );
472
473 m_qmodal_showing = true;
474
475 WX_EVENT_LOOP event_loop;
476
477 m_qmodal_loop = &event_loop;
478
479 event_loop.Run();
480
481 m_qmodal_showing = false;
482
483 return GetReturnCode();
484}
Toggle a window's "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:46
#define WX_EVENT_LOOP
Definition: kiway_player.h:41
void ReparentQuasiModal(wxNonOwnedWindow *aWindow)
Move a window's parent to be the top-level window and force the window to be on top.
Definition: gtk/ui.cpp:65

References DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, DIALOG_SHIM::m_qmodal_showing, KIPLATFORM::UI::ReparentQuasiModal(), DIALOG_SHIM::Show(), and WX_EVENT_LOOP.

Referenced by SCH_EDIT_TOOL::ChangeSymbols(), S3D::Configure3DPaths(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), SCH_DRAWING_TOOLS::createNewText(), PCB::IFACE::CreateWindow(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties(), SCH_EDIT_TOOL::editFieldText(), SCH_EDITOR_CONTROL::EditSymbolFields(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), GLOBAL_EDIT_TOOL::EditTracksAndVias(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), InvokeCopperZonesEditor(), InvokeDialogCreateBOM(), InvokeDialogEditSymbolsLibId(), InvokeDialogRescueEach(), InvokeNonCopperZonesEditor(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), PCB_EDIT_FRAME::OnEditItemRequest(), SYMBOL_VIEWER_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SCH_EDITOR_CONTROL::RemapSymbols(), S3D::Select3DModel(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), PCB_EDIT_FRAME::ShowExchangeFootprintsDialog(), PCB_EDIT_FRAME::ShowFootprintPropertiesDialog(), PCB_BASE_EDIT_FRAME::ShowGraphicItemPropertiesDialog(), PCB_BASE_FRAME::ShowPadPropertiesDialog(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), PCB_BASE_EDIT_FRAME::ShowTextBoxPropertiesDialog(), PCB_BASE_EDIT_FRAME::ShowTextPropertiesDialog(), and PCB_EDIT_FRAME::ToPlotter().

◆ vertPixelsFromDU()

int DIALOG_SHIM::vertPixelsFromDU ( int  y) const
protectedinherited

Convert an integer number of dialog units to pixels, vertically.

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 183 of file dialog_shim.cpp.

184{
185 wxSize sz( 0, y );
186 return ConvertDialogToPixels( sz ).y;
187}

Referenced by DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL().

Member Data Documentation

◆ m_browseButton

wxBitmapButton* DIALOG_PLOT_SCHEMATIC_BASE::m_browseButton
protectedinherited

◆ m_colorTheme

wxChoice* DIALOG_PLOT_SCHEMATIC_BASE::m_colorTheme
protectedinherited

◆ m_configChanged

bool DIALOG_PLOT_SCHEMATIC::m_configChanged
private

◆ m_defaultLineWidth

UNIT_BINDER DIALOG_PLOT_SCHEMATIC::m_defaultLineWidth
private

Definition at line 210 of file dialog_plot_schematic.h.

Referenced by getPlotOptions(), initDlg(), and OnUpdateUI().

◆ m_firstPaintEvent

bool DIALOG_SHIM::m_firstPaintEvent
protectedinherited

Definition at line 212 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint().

◆ m_hash_key

◆ m_HPGLOptionsSizer

wxStaticBoxSizer* DIALOG_PLOT_SCHEMATIC_BASE::m_HPGLOptionsSizer
protectedinherited

◆ m_HPGLPaperSizeSelect

int DIALOG_PLOT_SCHEMATIC::m_HPGLPaperSizeSelect = PAGE_SIZE_AUTO
staticprivate

Definition at line 207 of file dialog_plot_schematic.h.

Referenced by getPlotOptions(), initDlg(), OnPageSizeSelected(), and OnUpdateUI().

◆ m_HPGLPenSize

double DIALOG_PLOT_SCHEMATIC::m_HPGLPenSize
private

◆ m_initialFocusTarget

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

Definition at line 213 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint(), and DIALOG_SHIM::SetInitialFocus().

◆ m_initialSize

wxSize DIALOG_SHIM::m_initialSize
protectedinherited

Definition at line 225 of file dialog_shim.h.

Referenced by DIALOG_SHIM::Show().

◆ m_kiway

KIWAY* KIWAY_HOLDER::m_kiway
privateinherited

◆ m_lineWidthCtrl

wxTextCtrl* DIALOG_PLOT_SCHEMATIC_BASE::m_lineWidthCtrl
protectedinherited

◆ m_lineWidthLabel

wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_lineWidthLabel
protectedinherited

◆ m_lineWidthUnits

wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_lineWidthUnits
protectedinherited

◆ m_MessagesBox

◆ m_ModeColorOption

wxChoice* DIALOG_PLOT_SCHEMATIC_BASE::m_ModeColorOption
protectedinherited

◆ m_optionsSizer

wxBoxSizer* DIALOG_PLOT_SCHEMATIC_BASE::m_optionsSizer
protectedinherited

◆ m_outputDirectoryName

wxTextCtrl* DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName
protectedinherited

◆ m_pageSizeSelect

int DIALOG_PLOT_SCHEMATIC::m_pageSizeSelect = PAGE_SIZE_AUTO
staticprivate

◆ m_paperSizeOption

wxChoice* DIALOG_PLOT_SCHEMATIC_BASE::m_paperSizeOption
protectedinherited

◆ m_parent

◆ m_parentFrame

EDA_BASE_FRAME* DIALOG_SHIM::m_parentFrame
protectedinherited

◆ m_penWidth

UNIT_BINDER DIALOG_PLOT_SCHEMATIC::m_penWidth
private

Definition at line 211 of file dialog_plot_schematic.h.

Referenced by getPlotOptions(), initDlg(), OnUpdateUI(), and setHpglPenWidth().

◆ m_penWidthCtrl

wxTextCtrl* DIALOG_PLOT_SCHEMATIC_BASE::m_penWidthCtrl
protectedinherited

◆ m_penWidthLabel

wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_penWidthLabel
protectedinherited

◆ m_penWidthUnits

wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_penWidthUnits
protectedinherited

◆ m_plotBackgroundColor

wxCheckBox* DIALOG_PLOT_SCHEMATIC_BASE::m_plotBackgroundColor
protectedinherited

◆ m_plotDrawingSheet

wxCheckBox* DIALOG_PLOT_SCHEMATIC_BASE::m_plotDrawingSheet
protectedinherited

◆ m_plotFormat

PLOT_FORMAT DIALOG_PLOT_SCHEMATIC::m_plotFormat
private

Definition at line 205 of file dialog_plot_schematic.h.

Referenced by OnUpdateUI().

◆ m_plotFormatOpt

wxRadioBox* DIALOG_PLOT_SCHEMATIC_BASE::m_plotFormatOpt
protectedinherited

◆ m_plotOriginOpt

wxChoice* DIALOG_PLOT_SCHEMATIC_BASE::m_plotOriginOpt
protectedinherited

◆ m_plotOriginTitle

wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_plotOriginTitle
protectedinherited

◆ m_qmodal_loop

WX_EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 215 of file dialog_shim.h.

Referenced by DIALOG_SHIM::EndQuasiModal(), and DIALOG_SHIM::ShowQuasiModal().

◆ m_qmodal_parent_disabler

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited

◆ m_qmodal_showing

bool DIALOG_SHIM::m_qmodal_showing
protectedinherited

Definition at line 217 of file dialog_shim.h.

Referenced by DIALOG_SHIM::IsQuasiModal(), and DIALOG_SHIM::ShowQuasiModal().

◆ m_sdbSizer1

wxStdDialogButtonSizer* DIALOG_PLOT_SCHEMATIC_BASE::m_sdbSizer1
protectedinherited

◆ m_sdbSizer1Apply

wxButton* DIALOG_PLOT_SCHEMATIC_BASE::m_sdbSizer1Apply
protectedinherited

◆ m_sdbSizer1Cancel

wxButton* DIALOG_PLOT_SCHEMATIC_BASE::m_sdbSizer1Cancel
protectedinherited

◆ m_sdbSizer1OK

wxButton* DIALOG_PLOT_SCHEMATIC_BASE::m_sdbSizer1OK
protectedinherited

◆ m_staticText4

wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_staticText4
protectedinherited

◆ m_staticText9

wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_staticText9
protectedinherited

◆ m_staticTextOutputDirectory

wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_staticTextOutputDirectory
protectedinherited

◆ m_tabOrder

◆ m_type

HOLDER_TYPE KIWAY_HOLDER::m_type
privateinherited

Definition at line 85 of file kiway_holder.h.

Referenced by KIWAY_HOLDER::GetType(), and SIM_PLOT_FRAME::onSimFinished().

◆ m_units

◆ m_useCalculatedSize

bool DIALOG_SHIM::m_useCalculatedSize
protectedinherited

The documentation for this class was generated from the following files: