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, SCREEN }
 

Public Member Functions

 DIALOG_PLOT_SCHEMATIC (SCH_EDIT_FRAME *parent)
 
bool PrjConfigChanged ()
 
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 ()
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
void OnPaint (wxPaintEvent &event)
 
EDA_UNITS GetUserUnits () const
 
HOLDER_TYPE GetType ()
 
KIWAYKiway () const
 Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in. More...
 
PROJECTPrj () const
 Function Prj returns a reference to the PROJECT "associated with" this KIWAY. More...
 
void SetKiway (wxWindow *aDest, KIWAY *aKiway)
 Function SetKiway. More...
 

Static Public Member Functions

static bool plotOneSheetSVG (EDA_DRAW_FRAME *aFrame, const wxString &aFileName, SCH_SCREEN *aScreen, bool aPlotBlackAndWhite, bool aPlotFrameRef, bool aPlotBackgroundColor=false, COLOR_SETTINGS *aColors=nullptr)
 
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)
 Convert an integer number of dialog units to pixels, horizontally. More...
 
int VertPixelsFromDU (int y)
 Convert an integer number of dialog units to pixels, vertically. More...
 
void ResetSize ()
 Clear the existing dialog size and position. More...
 

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_PlotFrameRefOpt
 
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_firstPaintEvent
 
wxWindow * m_initialFocusTarget
 
WX_EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 
std::vector< wxWindow * > m_tabOrder
 

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 ()
 
bool getModeColor ()
 
void setModeColor (bool aColor)
 
void OnOutputDirectoryBrowseClicked (wxCommandEvent &event) override
 Set the m_outputDirectoryName variable to the selected directory from directory dialog. More...
 
PLOT_FORMAT GetPlotFileFormat ()
 
bool getPlotFrameRef ()
 
void setPlotFrameRef (bool aPlot)
 
void PlotSchematic (bool aPlotAll)
 
void createPDFFile (bool aPlotAll, bool aPlotFrameRef)
 
void plotOneSheetPDF (PLOTTER *aPlotter, SCH_SCREEN *aScreen, bool aPlotFrameRef)
 
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 CreateDXFFile (bool aPlotAll, bool aPlotFrameRef)
 
bool PlotOneSheetDXF (const wxString &aFileName, SCH_SCREEN *aScreen, wxPoint aPlot0ffset, double aScale, bool aPlotFrameRef)
 
bool GetPlotOriginCenter ()
 
void SetPlotOriginCenter (bool aCenter)
 
void createHPGLFile (bool aPlotAll, bool aPlotFrameRef)
 
void SetHPGLPenWidth ()
 
bool Plot_1_Page_HPGL (const wxString &aFileName, SCH_SCREEN *aScreen, const PAGE_INFO &aPageInfo, wxPoint aPlot0ffset, double aScale, bool aPlotFrameRef)
 
void createPSFile (bool aPlotAll, bool aPlotFrameRef)
 
bool plotOneSheetPS (const wxString &aFileName, SCH_SCREEN *aScreen, const PAGE_INFO &aPageInfo, wxPoint aPlot0ffset, double aScale, bool aPlotFrameRef)
 
void createSVGFile (bool aPlotAll, bool aPlotFrameRef)
 
wxFileName createPlotFileName (wxTextCtrl *aOutputDirectoryName, wxString &aPlotFileName, wxString &aExtension, REPORTER *aReporter=NULL)
 Create a file name with an absolute path name. More...
 

Private Attributes

SCH_EDIT_FRAMEm_parent
 
bool m_configChanged
 
PLOT_FORMAT m_plotFormat
 
double m_HPGLPenSize
 
UNIT_BINDER m_defaultLineWidth
 
UNIT_BINDER m_penWidth
 

Static Private Attributes

static int m_pageSizeSelect = PAGE_SIZE_AUTO
 
static int m_HPGLPaperSizeSelect = PAGE_SIZE_AUTO
 

Detailed Description

Definition at line 46 of file dialog_plot_schematic.h.

Member Enumeration Documentation

◆ HOLDER_TYPE

enum KIWAY_HOLDER::HOLDER_TYPE
inherited
Enumerator
DIALOG 
FRAME 
PANEL 
SCREEN 

Definition at line 42 of file kiway_holder.h.

Constructor & Destructor Documentation

◆ DIALOG_PLOT_SCHEMATIC()

DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC ( SCH_EDIT_FRAME parent)

Definition at line 58 of file dialog_plot_schematic.cpp.

59  : DIALOG_PLOT_SCHEMATIC_BASE( parent ),
60  m_parent( parent ),
64 {
65  m_configChanged = false;
66 
67  m_browseButton->SetBitmap( KiBitmap( folder_xpm ) );
68 
69  // We use a sdbSizer to get platform-dependent ordering of the action buttons, but
70  // that requires us to correct the button labels here.
71  m_sdbSizer1OK->SetLabel( _( "Plot All Pages" ) );
72  m_sdbSizer1Apply->SetLabel( _( "Plot Current Page" ) );
73  m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
74  m_sdbSizer1->Layout();
75 
76  m_sdbSizer1OK->SetDefault();
77  initDlg();
78 
79  // Now all widgets have the size fixed, call FinishDialogSettings
81 }
const BITMAP_OPAQUE folder_xpm[1]
Definition: folder.cpp:20
wxStdDialogButtonSizer * m_sdbSizer1
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
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)
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:80
#define _(s)
Definition: 3d_actions.cpp:33

References _, DIALOG_SHIM::FinishDialogSettings(), folder_xpm, initDlg(), KiBitmap(), DIALOG_PLOT_SCHEMATIC_BASE::m_browseButton, m_configChanged, DIALOG_PLOT_SCHEMATIC_BASE::m_sdbSizer1, DIALOG_PLOT_SCHEMATIC_BASE::m_sdbSizer1Apply, DIALOG_PLOT_SCHEMATIC_BASE::m_sdbSizer1Cancel, DIALOG_PLOT_SCHEMATIC_BASE::m_sdbSizer1OK, and UNDEFINED.

Member Function Documentation

◆ CreateDXFFile()

void DIALOG_PLOT_SCHEMATIC::CreateDXFFile ( bool  aPlotAll,
bool  aPlotFrameRef 
)
private

Definition at line 40 of file plot_schematic_DXF.cpp.

41 {
42  SCH_EDIT_FRAME* schframe = m_parent;
43  SCH_SCREEN* screen = schframe->GetScreen();
44  SCH_SHEET_PATH oldsheetpath = schframe->GetCurrentSheet();
45 
46  /* When printing all pages, the printed page is not the current page.
47  * In complex hierarchies, we must setup references and others parameters
48  * in the printed SCH_SCREEN
49  * because in complex hierarchies a SCH_SCREEN (a schematic drawings)
50  * is shared between many sheets
51  */
52  SCH_SHEET_LIST sheetList;
53 
54  if( aPlotAll )
55  sheetList.BuildSheetList( g_RootSheet );
56  else
57  sheetList.push_back( schframe->GetCurrentSheet() );
58 
59  REPORTER& reporter = m_MessagesBox->Reporter();
60 
61  for( unsigned i = 0; i < sheetList.size(); i++ )
62  {
63  schframe->SetCurrentSheet( sheetList[i] );
65  schframe->SetSheetNumberAndCount();
66  screen = schframe->GetCurrentSheet().LastScreen();
67 
68  wxPoint plot_offset;
69  wxString msg;
70 
71  try
72  {
73  wxString fname = schframe->GetUniqueFilenameForCurrentSheet();
74  wxString ext = DXF_PLOTTER::GetDefaultFileExtension();
75  wxFileName plotFileName = createPlotFileName( m_outputDirectoryName, fname,
76  ext, &reporter );
77 
78  if( PlotOneSheetDXF( plotFileName.GetFullPath(), screen, plot_offset, 1.0,
79  aPlotFrameRef ) )
80  {
81  msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
82  reporter.Report( msg, RPT_SEVERITY_ACTION );
83  }
84  else // Error
85  {
86  msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
87  reporter.Report( msg, RPT_SEVERITY_ERROR );
88  }
89  }
90  catch( IO_ERROR& e )
91  {
92  msg.Printf( wxT( "DXF Plotter exception: %s"), e.What() );
93  reporter.Report( msg, RPT_SEVERITY_ERROR );
94  schframe->SetCurrentSheet( oldsheetpath );
96  schframe->SetSheetNumberAndCount();
97  return;
98  }
99  }
100 
101  schframe->SetCurrentSheet( oldsheetpath );
103  schframe->SetSheetNumberAndCount();
104 }
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
SCH_SHEET_LIST.
Schematic editor (Eeschema) main window.
REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:62
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
static wxString GetDefaultFileExtension()
Definition: plotter.h:1421
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
wxFileName createPlotFileName(wxTextCtrl *aOutputDirectoryName, wxString &aPlotFileName, wxString &aExtension, REPORTER *aReporter=NULL)
Create a file name with an absolute path name.
REPORTER & Reporter()
returns the reporter object that reports to this panel
SCH_SHEET_PATH & GetCurrentSheet()
bool PlotOneSheetDXF(const wxString &aFileName, SCH_SCREEN *aScreen, wxPoint aPlot0ffset, double aScale, bool aPlotFrameRef)
SCH_SHEET_PATH.
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
SCH_SCREEN * LastScreen()
Function LastScreen.
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
#define _(s)
Definition: 3d_actions.cpp:33
wxString GetUniqueFilenameForCurrentSheet()
SCH_SHEET * g_RootSheet
WX_HTML_REPORT_PANEL * m_MessagesBox
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:76

References _, SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), g_RootSheet, SCH_EDIT_FRAME::GetCurrentSheet(), DXF_PLOTTER::GetDefaultFileExtension(), SCH_EDIT_FRAME::GetScreen(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), SCH_SHEET_PATH::LastScreen(), DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox, DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_parent, PlotOneSheetDXF(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, SCH_EDIT_FRAME::SetCurrentSheet(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), SCH_SHEET_PATH::UpdateAllScreenReferences(), and IO_ERROR::What().

Referenced by PlotSchematic().

◆ createHPGLFile()

void DIALOG_PLOT_SCHEMATIC::createHPGLFile ( bool  aPlotAll,
bool  aPlotFrameRef 
)
private

Definition at line 87 of file plot_schematic_HPGL.cpp.

88 {
89  SCH_SCREEN* screen = m_parent->GetScreen();
90  SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet();
91 
92  /* When printing all pages, the printed page is not the current page.
93  * In complex hierarchies, we must setup references and other parameters
94  * in the printed SCH_SCREEN
95  * because in complex hierarchies a SCH_SCREEN (a schematic drawings)
96  * is shared between many sheets
97  */
98  SCH_SHEET_LIST sheetList;
99 
100  if( aPlotAll )
101  sheetList.BuildSheetList( g_RootSheet );
102  else
103  sheetList.push_back( m_parent->GetCurrentSheet() );
104 
105  REPORTER& reporter = m_MessagesBox->Reporter();
106 
107  SetHPGLPenWidth();
108 
109  for( unsigned i = 0; i < sheetList.size(); i++ )
110  {
111  m_parent->SetCurrentSheet( sheetList[i] );
114 
115  screen = m_parent->GetCurrentSheet().LastScreen();
116 
117  if( !screen ) // LastScreen() may return NULL
118  screen = m_parent->GetScreen();
119 
120  const PAGE_INFO& curPage = screen->GetPageSettings();
121 
122  PAGE_INFO plotPage = curPage;
123 
124  // if plotting on a page size other than curPage
125  if( m_paperSizeOption->GetSelection() != PAGE_DEFAULT )
126  plotPage.SetType( plot_sheet_list( m_paperSizeOption->GetSelection() ) );
127 
128  // Calculation of conversion scales.
129  double plot_scale = (double) plotPage.GetWidthMils() / curPage.GetWidthMils();
130 
131  // Calculate offsets
132  wxPoint plotOffset;
133  wxString msg;
134 
135  if( GetPlotOriginCenter() )
136  {
137  plotOffset.x = plotPage.GetWidthIU() / 2;
138  plotOffset.y = -plotPage.GetHeightIU() / 2;
139  }
140 
141  try
142  {
143  wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
144  wxString ext = HPGL_PLOTTER::GetDefaultFileExtension();
145  wxFileName plotFileName = createPlotFileName( m_outputDirectoryName, fname,
146  ext, &reporter );
147 
148  LOCALE_IO toggle;
149 
150  if( Plot_1_Page_HPGL( plotFileName.GetFullPath(), screen, plotPage, plotOffset,
151  plot_scale, aPlotFrameRef ) )
152  {
153  msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
154  reporter.Report( msg, RPT_SEVERITY_ACTION );
155  }
156  else
157  {
158  msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
159  reporter.Report( msg, RPT_SEVERITY_ERROR );
160  }
161  }
162  catch( IO_ERROR& e )
163  {
164  msg.Printf( wxT( "HPGL Plotter exception: %s"), e.What() );
165  reporter.Report( msg, RPT_SEVERITY_ERROR );
166  }
167 
168  }
169 
170  m_parent->SetCurrentSheet( oldsheetpath );
173 }
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
SCH_SHEET_LIST.
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: common.h:202
bool SetType(const wxString &aStandardPageDescriptionName, bool aIsPortrait=false)
Function SetType sets the name of the page type and also the sizes and margins commonly associated wi...
Definition: page_info.cpp:117
REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:62
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:152
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
static const wxChar * plot_sheet_list(int aSize)
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
wxFileName createPlotFileName(wxTextCtrl *aOutputDirectoryName, wxString &aPlotFileName, wxString &aExtension, REPORTER *aReporter=NULL)
Create a file name with an absolute path name.
PAGE_INFO describes the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
REPORTER & Reporter()
returns the reporter object that reports to this panel
SCH_SHEET_PATH & GetCurrentSheet()
SCH_SHEET_PATH.
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
SCH_SCREEN * LastScreen()
Function LastScreen.
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
#define _(s)
Definition: 3d_actions.cpp:33
static wxString GetDefaultFileExtension()
Definition: plotter.h:632
wxString GetUniqueFilenameForCurrentSheet()
bool Plot_1_Page_HPGL(const wxString &aFileName, SCH_SCREEN *aScreen, const PAGE_INFO &aPageInfo, wxPoint aPlot0ffset, double aScale, bool aPlotFrameRef)
SCH_SHEET * g_RootSheet
WX_HTML_REPORT_PANEL * m_MessagesBox
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:76
int GetWidthMils() const
Definition: page_info.h:137

References _, SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), g_RootSheet, SCH_EDIT_FRAME::GetCurrentSheet(), HPGL_PLOTTER::GetDefaultFileExtension(), SCH_SCREEN::GetPageSettings(), GetPlotOriginCenter(), 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_outputDirectoryName, DIALOG_PLOT_SCHEMATIC_BASE::m_paperSizeOption, m_parent, PAGE_DEFAULT, Plot_1_Page_HPGL(), plot_sheet_list(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, SCH_EDIT_FRAME::SetCurrentSheet(), SetHPGLPenWidth(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), PAGE_INFO::SetType(), SCH_SHEET_PATH::UpdateAllScreenReferences(), IO_ERROR::What(), wxPoint::x, and wxPoint::y.

Referenced by PlotSchematic().

◆ createPDFFile()

void DIALOG_PLOT_SCHEMATIC::createPDFFile ( bool  aPlotAll,
bool  aPlotFrameRef 
)
private

Definition at line 43 of file plot_schematic_PDF.cpp.

44 {
45  SCH_SCREEN* screen = m_parent->GetScreen();
46  SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet(); // sheetpath is saved here
47 
48  /* When printing all pages, the printed page is not the current page. In
49  * complex hierarchies, we must update component references and others
50  * parameters in the given printed SCH_SCREEN, accordint to the sheet path
51  * because in complex hierarchies a SCH_SCREEN (a drawing ) is shared
52  * between many sheets and component references depend on the actual sheet
53  * path used
54  */
55  SCH_SHEET_LIST sheetList;
56 
57  if( aPlotAll )
58  sheetList.BuildSheetList( g_RootSheet );
59  else
60  sheetList.push_back( m_parent->GetCurrentSheet() );
61 
62  auto colors = static_cast<COLOR_SETTINGS*>(
63  m_colorTheme->GetClientData( m_colorTheme->GetSelection() ) );
64 
65  // Allocate the plotter and set the job level parameter
66  PDF_PLOTTER* plotter = new PDF_PLOTTER();
68  plotter->SetColorMode( getModeColor() );
69  plotter->SetColorSettings( colors );
70  plotter->SetCreator( wxT( "Eeschema-PDF" ) );
71  plotter->SetTitle( m_parent->GetTitleBlock().GetTitle() );
72 
73  wxString msg;
74  wxFileName plotFileName;
75  REPORTER& reporter = m_MessagesBox->Reporter();
76  LOCALE_IO toggle; // Switch the locale to standard C
77 
78  for( unsigned i = 0; i < sheetList.size(); i++ )
79  {
80  m_parent->SetCurrentSheet( sheetList[i] );
83  screen = m_parent->GetCurrentSheet().LastScreen();
84 
85  if( i == 0 )
86  {
87 
88  try
89  {
90  wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
91  wxString ext = PDF_PLOTTER::GetDefaultFileExtension();
92  plotFileName = createPlotFileName( m_outputDirectoryName, fname, ext, &reporter );
93 
94  if( !plotter->OpenFile( plotFileName.GetFullPath() ) )
95  {
96  msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
97  reporter.Report( msg, RPT_SEVERITY_ERROR );
98  delete plotter;
99  return;
100  }
101 
102  // Open the plotter and do the first page
103  setupPlotPagePDF( plotter, screen );
104  plotter->StartPlot();
105  }
106  catch( const IO_ERROR& e )
107  {
108  // Cannot plot PDF file
109  msg.Printf( wxT( "PDF Plotter exception: %s" ), e.What() );
110  reporter.Report( msg, RPT_SEVERITY_ERROR );
111 
112  restoreEnvironment( plotter, oldsheetpath );
113  return;
114  }
115 
116  }
117  else
118  {
119  /* For the following pages you need to close the (finished) page,
120  * reconfigure, and then start a new one */
121  plotter->ClosePage();
122  setupPlotPagePDF( plotter, screen );
123  plotter->StartPage();
124  }
125 
126  plotOneSheetPDF( plotter, screen, aPlotFrameRef );
127  }
128 
129  // Everything done, close the plot and restore the environment
130  msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
131  reporter.Report( msg, RPT_SEVERITY_ACTION );
132 
133  restoreEnvironment( plotter, oldsheetpath );
134 }
static wxString GetDefaultFileExtension()
Definition: plotter.h:876
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
SCH_SHEET_LIST.
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:180
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: common.h:202
virtual void StartPage()
Starts a new page in the PDF document.
virtual void SetTitle(const wxString &aTitle)
Definition: plotter.h:185
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
Definition: plotter.h:133
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i....
REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:62
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
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)
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
virtual void ClosePage()
Close the current page in the PDF document (and emit its compressed stream)
virtual void SetDefaultLineWidth(int width) override
Set the default line width.
Definition: PS_plotter.cpp:53
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
wxFileName createPlotFileName(wxTextCtrl *aOutputDirectoryName, wxString &aPlotFileName, wxString &aExtension, REPORTER *aReporter=NULL)
Create a file name with an absolute path name.
REPORTER & Reporter()
returns the reporter object that reports to this panel
SCH_SHEET_PATH & GetCurrentSheet()
SCH_SHEET_PATH.
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
SCH_SCREEN * LastScreen()
Function LastScreen.
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
#define _(s)
Definition: 3d_actions.cpp:33
const TITLE_BLOCK & GetTitleBlock() const override
void SetColorSettings(COLOR_SETTINGS *aSettings)
Definition: plotter.h:143
wxString GetUniqueFilenameForCurrentSheet()
virtual bool OpenFile(const wxString &aFullFilename) override
Open or create the plot file aFullFilename.
Definition: PDF_plotter.cpp:50
const wxString & GetTitle() const
Definition: title_block.h:65
SCH_SHEET * g_RootSheet
WX_HTML_REPORT_PANEL * m_MessagesBox
virtual bool StartPlot() override
The PDF engine supports multiple pages; the first one is opened 'for free' the following are to be cl...
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:76
static VRML_COLOR colors[VRML_COLOR_LAST]
void plotOneSheetPDF(PLOTTER *aPlotter, SCH_SCREEN *aScreen, bool aPlotFrameRef)

References _, SCH_SHEET_LIST::BuildSheetList(), PDF_PLOTTER::ClosePage(), colors, createPlotFileName(), g_RootSheet, SCH_EDIT_FRAME::GetCurrentSheet(), PDF_PLOTTER::GetDefaultFileExtension(), GetDefaultLineThickness(), getModeColor(), SCH_EDIT_FRAME::GetScreen(), TITLE_BLOCK::GetTitle(), SCH_BASE_FRAME::GetTitleBlock(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), SCH_SHEET_PATH::LastScreen(), DIALOG_PLOT_SCHEMATIC_BASE::m_colorTheme, DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox, DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_parent, PDF_PLOTTER::OpenFile(), plotOneSheetPDF(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), restoreEnvironment(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, PLOTTER::SetColorMode(), PLOTTER::SetColorSettings(), PLOTTER::SetCreator(), SCH_EDIT_FRAME::SetCurrentSheet(), PSLIKE_PLOTTER::SetDefaultLineWidth(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), PLOTTER::SetTitle(), setupPlotPagePDF(), PDF_PLOTTER::StartPage(), PDF_PLOTTER::StartPlot(), SCH_SHEET_PATH::UpdateAllScreenReferences(), and IO_ERROR::What().

Referenced by PlotSchematic().

◆ createPlotFileName()

wxFileName DIALOG_PLOT_SCHEMATIC::createPlotFileName ( wxTextCtrl *  aOutputDirectoryName,
wxString &  aPlotFileName,
wxString &  aExtension,
REPORTER aReporter = NULL 
)
private

Create a file name with an absolute path name.

Parameters
aOutputDirectoryNamethe directory name to plot, this can be a relative name of the current project directory or an absolute directory name.
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 345 of file dialog_plot_schematic.cpp.

349 {
350  wxString outputDirName = aOutputDirectoryName->GetValue();
351  wxFileName outputDir = wxFileName::DirName( outputDirName );
352 
353  wxString plotFileName = Prj().AbsolutePath( aPlotFileName + wxT( "." ) + aExtension);
354 
355  if( !EnsureFileDirectoryExists( &outputDir, plotFileName, aReporter ) )
356  {
357  wxString msg = wxString::Format( _( "Could not write plot files to folder \"%s\"." ),
358  outputDir.GetPath() );
359  aReporter->Report( msg, RPT_SEVERITY_ERROR );
360  }
361 
362  wxFileName fn( plotFileName );
363  fn.SetPath( outputDir.GetFullPath() );
364  return fn;
365 }
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
VTBL_ENTRY const wxString AbsolutePath(const wxString &aFileName) const
Function AbsolutePath fixes up aFileName if it is relative to the project's directory to be an absolu...
Definition: project.cpp:413
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
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:552
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
#define _(s)
Definition: 3d_actions.cpp:33

References _, PROJECT::AbsolutePath(), EnsureFileDirectoryExists(), Format(), KIWAY_HOLDER::Prj(), REPORTER::Report(), and RPT_SEVERITY_ERROR.

Referenced by CreateDXFFile(), createHPGLFile(), createPDFFile(), createPSFile(), and createSVGFile().

◆ createPSFile()

void DIALOG_PLOT_SCHEMATIC::createPSFile ( bool  aPlotAll,
bool  aPlotFrameRef 
)
private

Definition at line 40 of file plot_schematic_PS.cpp.

41 {
42  SCH_SCREEN* screen = m_parent->GetScreen();
43  SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet(); // sheetpath is saved here
44  PAGE_INFO actualPage; // page size selected in schematic
45  PAGE_INFO plotPage; // page size selected to plot
46 
47  /* When printing all pages, the printed page is not the current page.
48  * In complex hierarchies, we must update component references
49  * and others parameters in the given printed SCH_SCREEN, accordint to the sheet path
50  * because in complex hierarchies a SCH_SCREEN (a drawing )
51  * is shared between many sheets and component references depend on the actual sheet path used
52  */
53  SCH_SHEET_LIST sheetList;
54 
55  if( aPlotAll )
56  sheetList.BuildSheetList( g_RootSheet );
57  else
58  sheetList.push_back( m_parent->GetCurrentSheet() );
59 
60  for( unsigned i = 0; i < sheetList.size(); i++ )
61  {
62  m_parent->SetCurrentSheet( sheetList[i] );
65  screen = m_parent->GetCurrentSheet().LastScreen();
66  actualPage = screen->GetPageSettings();
67 
68  switch( m_pageSizeSelect )
69  {
70  case PAGE_SIZE_A:
71  plotPage.SetType( wxT( "A" ) );
72  plotPage.SetPortrait( actualPage.IsPortrait() );
73  break;
74 
75  case PAGE_SIZE_A4:
76  plotPage.SetType( wxT( "A4" ) );
77  plotPage.SetPortrait( actualPage.IsPortrait() );
78  break;
79 
80  case PAGE_SIZE_AUTO:
81  default:
82  plotPage = actualPage;
83  break;
84  }
85 
86  double scalex = (double) plotPage.GetWidthMils() / actualPage.GetWidthMils();
87  double scaley = (double) plotPage.GetHeightMils() / actualPage.GetHeightMils();
88 
89  double scale = std::min( scalex, scaley );
90 
91  wxPoint plot_offset;
92 
93  wxString outputDirName = m_outputDirectoryName->GetValue();
94 
95  wxString msg;
96  REPORTER& reporter = m_MessagesBox->Reporter();
97 
98  try
99  {
100  wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
101  wxString ext = PS_PLOTTER::GetDefaultFileExtension();
102  wxFileName plotFileName = createPlotFileName( m_outputDirectoryName,
103  fname, ext, &reporter );
104 
105  if( plotOneSheetPS( plotFileName.GetFullPath(), screen, plotPage, plot_offset,
106  scale, aPlotFrameRef ) )
107  {
108  msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
109  reporter.Report( msg, RPT_SEVERITY_ACTION );
110  }
111  else
112  {
113  // Error
114  msg.Printf( _( "Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
115  reporter.Report( msg, RPT_SEVERITY_ERROR );
116  }
117 
118  }
119  catch( IO_ERROR& e )
120  {
121  msg.Printf( wxT( "PS Plotter exception: %s"), e.What() );
122  reporter.Report( msg, RPT_SEVERITY_ERROR );
123  }
124  }
125 
126  m_parent->SetCurrentSheet( oldsheetpath );
129 }
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
SCH_SHEET_LIST.
static wxString GetDefaultFileExtension()
Definition: plotter.h:813
int GetHeightMils() const
Definition: page_info.h:140
bool SetType(const wxString &aStandardPageDescriptionName, bool aIsPortrait=false)
Function SetType sets the name of the page type and also the sizes and margins commonly associated wi...
Definition: page_info.cpp:117
REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:62
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:152
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
bool plotOneSheetPS(const wxString &aFileName, SCH_SCREEN *aScreen, const PAGE_INFO &aPageInfo, wxPoint aPlot0ffset, double aScale, bool aPlotFrameRef)
wxFileName createPlotFileName(wxTextCtrl *aOutputDirectoryName, wxString &aPlotFileName, wxString &aExtension, REPORTER *aReporter=NULL)
Create a file name with an absolute path name.
PAGE_INFO describes the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
REPORTER & Reporter()
returns the reporter object that reports to this panel
SCH_SHEET_PATH & GetCurrentSheet()
SCH_SHEET_PATH.
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
const int scale
SCH_SCREEN * LastScreen()
Function LastScreen.
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
bool IsPortrait() const
Definition: page_info.h:121
#define _(s)
Definition: 3d_actions.cpp:33
wxString GetUniqueFilenameForCurrentSheet()
SCH_SHEET * g_RootSheet
WX_HTML_REPORT_PANEL * m_MessagesBox
void SetPortrait(bool aIsPortrait)
Function SetPortrait will rotate the paper page 90 degrees.
Definition: page_info.cpp:182
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:76
int GetWidthMils() const
Definition: page_info.h:137

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

Referenced by PlotSchematic().

◆ createSVGFile()

void DIALOG_PLOT_SCHEMATIC::createSVGFile ( bool  aPlotAll,
bool  aPlotFrameRef 
)
private

Definition at line 44 of file plot_schematic_SVG.cpp.

45 {
46  wxString msg;
47  REPORTER& reporter = m_MessagesBox->Reporter();
48  SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet();
49  SCH_SHEET_LIST sheetList;
50 
51  auto colors = static_cast<COLOR_SETTINGS*>(
52  m_colorTheme->GetClientData( m_colorTheme->GetSelection() ) );
53 
54  if( aPrintAll )
55  sheetList.BuildSheetList( g_RootSheet );
56  else
57  sheetList.push_back( m_parent->GetCurrentSheet() );
58 
59  for( unsigned i = 0; i < sheetList.size(); i++ )
60  {
61  SCH_SCREEN* screen;
62  m_parent->SetCurrentSheet( sheetList[i] );
65  screen = m_parent->GetCurrentSheet().LastScreen();
66 
67  try
68  {
69  wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
70  wxString ext = SVG_PLOTTER::GetDefaultFileExtension();
71  wxFileName plotFileName = createPlotFileName( m_outputDirectoryName,
72  fname, ext, &reporter );
73 
74  bool success = plotOneSheetSVG( m_parent, plotFileName.GetFullPath(), screen,
75  getModeColor() ? false : true,
76  aPrintFrameRef, m_plotBackgroundColor->GetValue(),
77  colors );
78 
79  if( !success )
80  {
81  msg.Printf( _( "Cannot create file \"%s\".\n" ), plotFileName.GetFullPath() );
82  reporter.Report( msg, RPT_SEVERITY_ERROR );
83  }
84  else
85  {
86  msg.Printf( _( "Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
87  reporter.Report( msg, RPT_SEVERITY_ACTION );
88  }
89  }
90  catch( const IO_ERROR& e )
91  {
92  // Cannot plot SVG file
93  msg.Printf( wxT( "SVG Plotter exception: %s" ), e.What() );
94  reporter.Report( msg, RPT_SEVERITY_ERROR );
95  break;
96  }
97  }
98 
99  m_parent->SetCurrentSheet( oldsheetpath );
102 }
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
SCH_SHEET_LIST.
static wxString GetDefaultFileExtension()
Definition: plotter.h:954
REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:62
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
wxFileName createPlotFileName(wxTextCtrl *aOutputDirectoryName, wxString &aPlotFileName, wxString &aExtension, REPORTER *aReporter=NULL)
Create a file name with an absolute path name.
REPORTER & Reporter()
returns the reporter object that reports to this panel
SCH_SHEET_PATH & GetCurrentSheet()
SCH_SHEET_PATH.
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
static bool plotOneSheetSVG(EDA_DRAW_FRAME *aFrame, const wxString &aFileName, SCH_SCREEN *aScreen, bool aPlotBlackAndWhite, bool aPlotFrameRef, bool aPlotBackgroundColor=false, COLOR_SETTINGS *aColors=nullptr)
SCH_SCREEN * LastScreen()
Function LastScreen.
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
#define _(s)
Definition: 3d_actions.cpp:33
wxString GetUniqueFilenameForCurrentSheet()
SCH_SHEET * g_RootSheet
WX_HTML_REPORT_PANEL * m_MessagesBox
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:76
static VRML_COLOR colors[VRML_COLOR_LAST]

References _, SCH_SHEET_LIST::BuildSheetList(), colors, createPlotFileName(), g_RootSheet, SCH_EDIT_FRAME::GetCurrentSheet(), SVG_PLOTTER::GetDefaultFileExtension(), getModeColor(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), SCH_SHEET_PATH::LastScreen(), DIALOG_PLOT_SCHEMATIC_BASE::m_colorTheme, DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox, DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_parent, DIALOG_PLOT_SCHEMATIC_BASE::m_plotBackgroundColor, plotOneSheetSVG(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, SCH_EDIT_FRAME::SetCurrentSheet(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), SCH_SHEET_PATH::UpdateAllScreenReferences(), and IO_ERROR::What().

Referenced by PlotSchematic().

◆ Enable()

bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 262 of file dialog_shim.cpp.

263 {
264  // so we can do logging of this state change:
265 
266 #if 0 && defined(DEBUG)
267  const char* type_id = typeid( *this ).name();
268  printf( "DIALOG_SHIM %s: %s\n", type_id, enable ? "enabled" : "disabled" );
269  fflush(0); //Needed on msys2 to immediately print the message
270 #endif
271 
272  return wxDialog::Enable( enable );
273 }

◆ EndQuasiModal()

void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 419 of file dialog_shim.cpp.

420 {
421  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
422  // handle validation in the same way as other dialogs.
423  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
424  return;
425 
426  SetReturnCode( retCode );
427 
428  if( !IsQuasiModal() )
429  {
430  wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal"
431  "wasn't called" );
432  return;
433  }
434 
435  if( m_qmodal_loop )
436  {
437  if( m_qmodal_loop->IsRunning() )
438  m_qmodal_loop->Exit( 0 );
439  else
440  m_qmodal_loop->ScheduleExit( 0 );
441 
443  }
444 
447 
448  Show( false );
449 }
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:205
#define NULL
bool IsQuasiModal()
Definition: dialog_shim.h:124
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:208

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

Referenced by HK_PROMPT_DIALOG::EndFlexible(), DIALOG_SHIM::OnButton(), DIALOG_EDIT_COMPONENTS_LIBID::onCancel(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnCancelButtonClick(), DIALOG_LIB_EDIT_PIN_TABLE::OnClose(), DIALOG_PRINT_GENERIC::onCloseButton(), DIALOG_CHOOSE_FOOTPRINT::OnCloseTimer(), DIALOG_CHOOSE_COMPONENT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), HTML_MESSAGE_BOX::OnOKButtonClick(), DIALOG_CHOOSE_FOOTPRINT::OnUseBrowser(), DIALOG_CHOOSE_COMPONENT::OnUseBrowser(), 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, when all widgets are initialized, and therefore their size fixed. If TransferDataToWindow() is used to initialize widgets, at end of TransferDataToWindow, or better at end of a wxInitDialogEvent handler

In any case, the best way is to call it in a wxInitDialogEvent handler after calling TransfertDataToWindow(), which is the default wxInitDialogEvent handler wxDialog

Definition at line 137 of file dialog_shim.cpp.

138 {
139  // must be called from the constructor of derived classes,
140  // when all widgets are initialized, and therefore their size fixed
141 
142  // SetSizeHints fixes the minimal size of sizers in the dialog
143  // (SetSizeHints calls Fit(), so no need to call it)
144  GetSizer()->SetSizeHints( this );
145 
146  // the default position, when calling the first time the dlg
147  Center();
148 }

References PCAD2KICAD::Center.

Referenced by DIALOG_3D_VIEW_OPTIONS::DIALOG_3D_VIEW_OPTIONS(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP(), DIALOG_BOM::DIALOG_BOM(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_DRC::DIALOG_DRC(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC(), DIALOG_EDIT_COMPONENTS_LIBID::DIALOG_EDIT_COMPONENTS_LIBID(), DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(), DIALOG_EDIT_SHEET_PIN::DIALOG_EDIT_SHEET_PIN(), DIALOG_EDITOR_DATA::DIALOG_EDITOR_DATA(), 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_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS(), DIALOG_FP_BROWSER_DISPLAY_OPTIONS::DIALOG_FP_BROWSER_DISPLAY_OPTIONS(), 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_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR(), DIALOG_KEEPOUT_AREA_PROPERTIES::DIALOG_KEEPOUT_AREA_PROPERTIES(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM(), DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN(), DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT(), DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT(), DIALOG_NETLIST::DIALOG_NETLIST(), 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_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_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS(), DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP(), DIALOG_SELECT_NET_FROM_LIST::DIALOG_SELECT_NET_FROM_LIST(), DIALOG_SET_GRID::DIALOG_SET_GRID(), DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), PAGED_DIALOG::finishInitialization(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_EDIT_LIBRARY_TABLES::InstallPanel(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_SCH_SHEET_PROPS::OnInitDlg(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), DIALOG_UPDATE_FIELDS::TransferDataToWindow(), DIALOG_COLOR_PICKER::TransferDataToWindow(), and DIALOG_BOARD_STATISTICS::TransferDataToWindow().

◆ getModeColor()

bool DIALOG_PLOT_SCHEMATIC::getModeColor ( )
inlineprivate

◆ GetPlotFileFormat()

PLOT_FORMAT DIALOG_PLOT_SCHEMATIC::GetPlotFileFormat ( )
private

Definition at line 193 of file dialog_plot_schematic.cpp.

194 {
195  switch( m_plotFormatOpt->GetSelection() )
196  {
197  default:
198  case 0:
199  return PLOT_FORMAT::POST;
200  case 1:
201  return PLOT_FORMAT::PDF;
202  case 2:
203  return PLOT_FORMAT::SVG;
204  case 3:
205  return PLOT_FORMAT::DXF;
206  case 4:
207  return PLOT_FORMAT::HPGL;
208  }
209 }

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

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

◆ getPlotFrameRef()

bool DIALOG_PLOT_SCHEMATIC::getPlotFrameRef ( )
inlineprivate

◆ getPlotOptions()

void DIALOG_PLOT_SCHEMATIC::getPlotOptions ( )
private

Definition at line 276 of file dialog_plot_schematic.cpp.

277 {
279 
280  auto cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
281 
282  cfg->m_PlotPanel.background_color = m_plotBackgroundColor->GetValue();
283  cfg->m_PlotPanel.color = getModeColor();
284  cfg->m_PlotPanel.color_theme = static_cast<COLOR_SETTINGS*>(
285  m_colorTheme->GetClientData( m_colorTheme->GetSelection() ) )->GetFilename();
286  cfg->m_PlotPanel.frame_reference = getPlotFrameRef();
287  cfg->m_PlotPanel.format = static_cast<int>( GetPlotFileFormat() );
288  cfg->m_PlotPanel.hpgl_origin = GetPlotOriginCenter();
289  cfg->m_PlotPanel.hpgl_paper_size = m_HPGLPaperSizeSelect;
290 
291  // HPGL Pen Size is stored in mm in config
292  cfg->m_PlotPanel.hpgl_pen_size = m_HPGLPenSize / IU_PER_MM;
293 
295 
296  // Plot directory
297  wxString path = m_outputDirectoryName->GetValue();
298  path.Replace( '\\', '/' );
299 
300  if( m_parent->GetPlotDirectoryName() != path )
301  m_configChanged = true;
302 
304 }
void SetPlotDirectoryName(const wxString &aDirName)
void SetDefaultLineThickness(int aThickness)
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
const wxString & GetPlotDirectoryName() const
accessor to the destination directory to use when generating plot files.
virtual long long int GetValue()
Function GetValue Returns the current value in Internal Units.

References getModeColor(), SCH_EDIT_FRAME::GetPlotDirectoryName(), GetPlotFileFormat(), getPlotFrameRef(), GetPlotOriginCenter(), UNIT_BINDER::GetValue(), Kiface(), DIALOG_PLOT_SCHEMATIC_BASE::m_colorTheme, m_configChanged, m_defaultLineWidth, m_HPGLPaperSizeSelect, m_HPGLPenSize, DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_parent, m_penWidth, DIALOG_PLOT_SCHEMATIC_BASE::m_plotBackgroundColor, SetDefaultLineThickness(), and SCH_EDIT_FRAME::SetPlotDirectoryName().

Referenced by PlotSchematic().

◆ GetPlotOriginCenter()

bool DIALOG_PLOT_SCHEMATIC::GetPlotOriginCenter ( )
inlineprivate

Definition at line 113 of file dialog_plot_schematic.h.

114  {
115  return m_plotOriginOpt->GetSelection() == 1;
116  }

References DIALOG_PLOT_SCHEMATIC_BASE::m_plotOriginOpt.

Referenced by createHPGLFile(), and getPlotOptions().

◆ GetType()

HOLDER_TYPE KIWAY_HOLDER::GetType ( )
inlineinherited

Definition at line 49 of file kiway_holder.h.

49 { return m_type; }
HOLDER_TYPE m_type
Definition: kiway_holder.h:82

References KIWAY_HOLDER::m_type.

Referenced by DIALOG_SHIM::DIALOG_SHIM().

◆ GetUserUnits()

◆ HorizPixelsFromDU()

int DIALOG_SHIM::HorizPixelsFromDU ( int  x)
protectedinherited

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

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 158 of file dialog_shim.cpp.

159 {
160  wxSize sz( x, 0 );
161  return ConvertDialogToPixels( sz ).x;
162 }

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

◆ initDlg()

void DIALOG_PLOT_SCHEMATIC::initDlg ( )
private

Definition at line 85 of file dialog_plot_schematic.cpp.

86 {
87  auto cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
88 
89  for( COLOR_SETTINGS* settings : Pgm().GetSettingsManager().GetColorSettingsList() )
90  {
91  int idx = m_colorTheme->Append( settings->GetName(), static_cast<void*>( settings ) );
92 
93  if( settings->GetFilename() == cfg->m_PlotPanel.color_theme )
94  m_colorTheme->SetSelection( idx );
95  }
96 
97  m_colorTheme->Enable( cfg->m_PlotPanel.color );
98 
99  m_plotBackgroundColor->Enable( cfg->m_PlotPanel.color );
100  m_plotBackgroundColor->SetValue( cfg->m_PlotPanel.background_color );
101 
102  // Set color or B&W plot option
103  setModeColor( cfg->m_PlotPanel.color );
104 
105  // Set plot or not frame reference option
106  setPlotFrameRef( cfg->m_PlotPanel.frame_reference );
107 
108  // Set HPGL plot origin to center of paper of left bottom corner
109  SetPlotOriginCenter( cfg->m_PlotPanel.hpgl_origin );
110 
111  m_HPGLPaperSizeSelect = cfg->m_PlotPanel.hpgl_paper_size;
112 
113  // HPGL Pen Size is stored in mm in config
114  m_HPGLPenSize = cfg->m_PlotPanel.hpgl_pen_size * IU_PER_MM;
115 
116  // Switch to the last save plot format
117  switch( static_cast<PLOT_FORMAT>( cfg->m_PlotPanel.format ) )
118  {
119  default:
120  case PLOT_FORMAT::POST:
121  m_plotFormatOpt->SetSelection( 0 );
122  break;
123  case PLOT_FORMAT::PDF:
124  m_plotFormatOpt->SetSelection( 1 );
125  break;
126  case PLOT_FORMAT::SVG:
127  m_plotFormatOpt->SetSelection( 2 );
128  break;
129  case PLOT_FORMAT::DXF:
130  m_plotFormatOpt->SetSelection( 3 );
131  m_plotBackgroundColor->Disable();
132  break;
133  case PLOT_FORMAT::HPGL:
134  m_plotFormatOpt->SetSelection( 4 );
135  m_plotBackgroundColor->Disable();
136  break;
137  }
138 
139  // Set the default line width (pen width which should be used for
140  // items that do not have a pen size defined (like frame ref)
142 
143  // Initialize HPGL specific widgets
145 
146  // Plot directory
147  wxString path = m_parent->GetPlotDirectoryName();
148 #ifdef __WINDOWS__
149  path.Replace( '/', '\\' );
150 #endif
151  m_outputDirectoryName->SetValue( path );
152 }
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:103
void SetPlotOriginCenter(bool aCenter)
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i....
void setPlotFrameRef(bool aPlot)
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
const wxString & GetPlotDirectoryName() const
accessor to the destination directory to use when generating plot files.
virtual void SetValue(int aValue)
Function SetValue Sets new value (in Internal Units) for the text field, taking care of units convers...
void setModeColor(bool aColor)

References DXF, GetDefaultLineThickness(), SCH_EDIT_FRAME::GetPlotDirectoryName(), HPGL, Kiface(), 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, DIALOG_PLOT_SCHEMATIC_BASE::m_plotFormatOpt, PDF, Pgm(), POST, setModeColor(), setPlotFrameRef(), SetPlotOriginCenter(), 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 137 of file dialog_shim.h.

138  {
139  return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
140  !e.ShiftDown() && !e.MetaDown();
141  }

Referenced by DIALOG_TEXT_PROPERTIES::OnCharHook(), and DIALOG_LABEL_EDITOR::OnCharHook().

◆ IsQuasiModal()

◆ IsShiftCtrl()

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

Definition at line 143 of file dialog_shim.h.

144  {
145  return e.GetKeyCode() == aChar && e.ControlDown() && !e.AltDown() &&
146  e.ShiftDown() && !e.MetaDown();
147  }

Referenced by DIALOG_TEXT_PROPERTIES::OnCharHook(), and DIALOG_LABEL_EDITOR::OnCharHook().

◆ Kiway()

KIWAY& KIWAY_HOLDER::Kiway ( ) const
inlineinherited

Function Kiway returns 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 56 of file kiway_holder.h.

57  {
58  wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
59  return *m_kiway;
60  }
KIWAY * m_kiway
Definition: kiway_holder.h:81

References KIWAY_HOLDER::m_kiway.

Referenced by TREEPROJECT_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), PCB_BASE_EDIT_FRAME::AddLibrary(), LIB_CONTROL::AddSymbolToSchematic(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), COMMON_CONTROL::ConfigurePaths(), DIALOG_CHOOSE_FOOTPRINT::ConstructRightPanel(), DIALOG_CHOOSE_COMPONENT::ConstructRightPanel(), PCB_BASE_FRAME::CreateAndShow3D_Frame(), SCH_EDIT_FRAME::CreateScreens(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SHIM::DIALOG_SHIM(), CVPCB_MAINFRAME::DisplayStatus(), FIELDS_GRID_TRICKS::doPopupSelection(), FIELDS_EDITOR_GRID_TRICKS::doPopupSelection(), EDIT_TOOL::EditFpInFpEditor(), SCH_EDITOR_CONTROL::EditWithLibEdit(), BACK_ANNOTATE::FetchNetlistFromPCB(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), LIB_MANAGER::GetBufferedPart(), LIB_MANAGER::getLibraryBuffer(), FOOTPRINT_EDIT_FRAME::GetPlotSettings(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::InitSheet(), KICAD_MANAGER_FRAME::language_change(), KIWAY_PLAYER::language_change(), LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER(), CVPCB_MAINFRAME::LoadFootprintFiles(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadSheetFromFile(), TEXT_BUTTON_SYMBOL_CHOOSER::OnButtonClick(), TEXT_BUTTON_FP_CHOOSER::OnButtonClick(), KICAD_MANAGER_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OnExit(), FOOTPRINT_EDIT_FRAME::OnExitKiCad(), FOOTPRINT_VIEWER_FRAME::OnExitKiCad(), LIB_EDIT_FRAME::OnExitKiCad(), SAVE_AS_TRAVERSER::OnFile(), KICAD_MANAGER_FRAME::OnImportEagleFiles(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbnew(), EDA_BASE_FRAME::OnPreferences(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard(), SCH_EDIT_FRAME::OnUpdatePCB(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDITOR_CONTROL::Paste(), KIWAY_HOLDER::Prj(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_EDIT_FRAME::refreshSchematic(), SCH_EDIT_FRAME::rescueProject(), EE_INSPECTION_TOOL::RunSimulation(), SCH_EDIT_FRAME::SaveEEFile(), CVPCB_MAINFRAME::SaveFootprintAssociation(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), LIB_TREE_MODEL_ADAPTER::SavePinnedItems(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), SCH_EDIT_FRAME::SendCrossProbeClearHighlight(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlistToCvpcb(), FOOTPRINT_EDIT_FRAME::SetPlotSettings(), CVPCB_CONTROL::ShowFootprintViewer(), COMMON_CONTROL::ShowLibraryTable(), COMMON_CONTROL::ShowPlayer(), KICAD_MANAGER_CONTROL::ShowPlayer(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), DIALOG_SCH_SHEET_PROPS::TransferDataFromWindow(), LIB_MANAGER::UpdatePart(), PCB_EDITOR_CONTROL::UpdateSchematicFromPCB(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

◆ OnCloseWindow()

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

◆ 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 159 of file dialog_plot_schematic.cpp.

160 {
161  // Build the absolute path of current output plot directory
162  // to preselect it when opening the dialog.
163  wxFileName fn( m_outputDirectoryName->GetValue() );
164  wxString path = Prj().AbsolutePath( m_outputDirectoryName->GetValue() );
165 
166  wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );
167 
168  if( dirDialog.ShowModal() == wxID_CANCEL )
169  return;
170 
171  wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
172 
174  wxString defaultPath = fn.GetPathWithSep();
175  wxString msg;
176  msg.Printf( _( "Do you want to use a path relative to\n\"%s\"" ), GetChars( defaultPath ) );
177 
178  wxMessageDialog dialog( this, msg, _( "Plot Output Directory" ),
179  wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
180 
181  // relative directory selected
182  if( dialog.ShowModal() == wxID_YES )
183  {
184  if( !dirName.MakeRelativeTo( defaultPath ) )
185  wxMessageBox( _( "Cannot make path relative (target volume different from file "
186  "volume)!" ), _( "Plot Output Directory" ), wxOK | wxICON_ERROR );
187  }
188 
189  m_outputDirectoryName->SetValue( dirName.GetFullPath() );
190 }
VTBL_ENTRY const wxString AbsolutePath(const wxString &aFileName) const
Function AbsolutePath fixes up aFileName if it is relative to the project's directory to be an absolu...
Definition: project.cpp:413
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
wxString GetFileName() const
Return the filename corresponding to this sheet.
Definition: sch_sheet.h:491
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:101
#define _(s)
Definition: 3d_actions.cpp:33
SCH_SHEET * g_RootSheet

References _, PROJECT::AbsolutePath(), g_RootSheet, GetChars(), SCH_SHEET::GetFileName(), DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, and KIWAY_HOLDER::Prj().

◆ OnPageSizeSelected()

void DIALOG_PLOT_SCHEMATIC::OnPageSizeSelected ( wxCommandEvent &  event)
overrideprivatevirtual

◆ OnPaint()

void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 320 of file dialog_shim.cpp.

321 {
322  if( m_firstPaintEvent )
323  {
324 #ifdef __WXMAC__
325  fixOSXCancelButtonIssue( this );
326 #endif
327 
328  selectAllInTextCtrls( GetChildren() );
329 
331  m_initialFocusTarget->SetFocus();
332  else
333  SetFocus(); // Focus the dialog itself
334 
335  m_firstPaintEvent = false;
336  }
337 
338  event.Skip();
339 }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:203
bool m_firstPaintEvent
Definition: dialog_shim.h:202
static void selectAllInTextCtrls(wxWindowList &children)

References 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 313 of file dialog_plot_schematic.cpp.

314 {
315  PlotSchematic( true );
316 }
void PlotSchematic(bool aPlotAll)

References PlotSchematic().

◆ OnPlotCurrent()

void DIALOG_PLOT_SCHEMATIC::OnPlotCurrent ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_SCHEMATIC_BASE.

Definition at line 307 of file dialog_plot_schematic.cpp.

308 {
309  PlotSchematic( false );
310 }
void PlotSchematic(bool aPlotAll)

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 221 of file dialog_plot_schematic.cpp.

222 {
224 
225  if( fmt != m_plotFormat )
226  {
227  m_plotFormat = fmt;
228 
229  wxArrayString paperSizes;
230  paperSizes.push_back( _( "Schematic size" ) );
231 
232  int selection;
233 
234  if( fmt == PLOT_FORMAT::HPGL )
235  {
236  paperSizes.push_back( _( "A4" ) );
237  paperSizes.push_back( _( "A3" ) );
238  paperSizes.push_back( _( "A2" ) );
239  paperSizes.push_back( _( "A1" ) );
240  paperSizes.push_back( _( "A0" ) );
241  paperSizes.push_back( _( "A" ) );
242  paperSizes.push_back( _( "B" ) );
243  paperSizes.push_back( _( "C" ) );
244  paperSizes.push_back( _( "D" ) );
245  paperSizes.push_back( _( "E" ) );
246 
247  selection = m_HPGLPaperSizeSelect;
248  }
249  else
250  {
251  paperSizes.push_back( _( "A4" ) );
252  paperSizes.push_back( _( "A" ) );
253 
254  selection = m_pageSizeSelect;
255  }
256 
257  m_paperSizeOption->Set( paperSizes );
258  m_paperSizeOption->SetSelection( selection );
259 
261  fmt == PLOT_FORMAT::POST || fmt == PLOT_FORMAT::PDF || fmt == PLOT_FORMAT::SVG );
262 
263  m_plotOriginTitle->Enable( fmt == PLOT_FORMAT::HPGL );
264  m_plotOriginOpt->Enable( fmt == PLOT_FORMAT::HPGL );
266 
267  m_plotBackgroundColor->Enable(
268  fmt == PLOT_FORMAT::POST || fmt == PLOT_FORMAT::PDF || fmt == PLOT_FORMAT::SVG );
269 
270  m_colorTheme->Enable( fmt != PLOT_FORMAT::HPGL );
271  m_ModeColorOption->Enable( fmt != PLOT_FORMAT::HPGL );
272  }
273 }
PLOT_FORMAT
Enum PlotFormat is the set of supported output plot formats.
Definition: plotter.h:51
#define _(s)
Definition: 3d_actions.cpp:33
void Enable(bool aEnable)
Function Enable Enables/diasables 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.

◆ Plot_1_Page_HPGL()

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

Definition at line 176 of file plot_schematic_HPGL.cpp.

182 {
183  HPGL_PLOTTER* plotter = new HPGL_PLOTTER();
184 
185  plotter->SetPageSettings( aPageInfo );
186  // Currently, plot units are in decimil
187  plotter->SetViewport( aPlot0ffset, IU_PER_MILS/10, aScale, false );
188 
189  // Init :
190  plotter->SetCreator( wxT( "Eeschema-HPGL" ) );
191 
192  if( ! plotter->OpenFile( aFileName ) )
193  {
194  delete plotter;
195  return false;
196  }
197 
198  LOCALE_IO toggle;
199 
200  // Pen num and pen speed are not initialized here.
201  // Default HPGL driver values are used
202  plotter->SetPenDiameter( m_HPGLPenSize );
203  plotter->StartPlot();
204 
205  if( getPlotFrameRef() )
206  PlotWorkSheet( plotter, m_parent->GetTitleBlock(),
208  aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
210  aScreen->GetFileName(),
211  COLOR4D::BLACK );
212 
213  aScreen->Plot( plotter );
214 
215  plotter->EndPlot();
216  delete plotter;
217 
218  return true;
219 }
virtual bool EndPlot() override
HPGL end of plot: pen return and release.
const wxString & GetFileName() const
Definition: sch_screen.h:157
int m_ScreenNumber
Definition: base_screen.h:135
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:180
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: common.h:202
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
Definition: plotter.cpp:82
virtual void SetPenDiameter(double diameter)
virtual bool StartPlot() override
At the start of the HPGL plot pen speed and number are requested.
virtual void SetViewport(const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
void PlotWorkSheet(PLOTTER *plotter, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, int aSheetNumber, int aNumberOfSheets, const wxString &aSheetDesc, const wxString &aFilename, const COLOR4D aColor)
wxString GetScreenDesc() const override
Return a human-readable description of the current screen.
void Plot(PLOTTER *aPlotter)
Plot all the schematic objects to aPlotter.
Definition: sch_screen.cpp:573
const PAGE_INFO & GetPageSettings() const override
const TITLE_BLOCK & GetTitleBlock() const override
#define IU_PER_MILS
Definition: plotter.cpp:137
int m_NumberOfScreens
Definition: base_screen.h:136
Definition: colors.h:45
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.h:147

References BLACK, HPGL_PLOTTER::EndPlot(), SCH_SCREEN::GetFileName(), SCH_BASE_FRAME::GetPageSettings(), getPlotFrameRef(), SCH_EDIT_FRAME::GetScreenDesc(), SCH_BASE_FRAME::GetTitleBlock(), IU_PER_MILS, m_HPGLPenSize, BASE_SCREEN::m_NumberOfScreens, m_parent, BASE_SCREEN::m_ScreenNumber, PLOTTER::OpenFile(), SCH_SCREEN::Plot(), PlotWorkSheet(), PLOTTER::SetCreator(), PLOTTER::SetPageSettings(), HPGL_PLOTTER::SetPenDiameter(), HPGL_PLOTTER::SetViewport(), and HPGL_PLOTTER::StartPlot().

Referenced by createHPGLFile().

◆ PlotOneSheetDXF()

bool DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF ( const wxString &  aFileName,
SCH_SCREEN aScreen,
wxPoint  aPlot0ffset,
double  aScale,
bool  aPlotFrameRef 
)
private

Definition at line 107 of file plot_schematic_DXF.cpp.

112 {
113  DXF_PLOTTER* plotter = new DXF_PLOTTER();
114 
115  auto colors = static_cast<COLOR_SETTINGS*>(
116  m_colorTheme->GetClientData( m_colorTheme->GetSelection() ) );
117 
118  const PAGE_INFO& pageInfo = aScreen->GetPageSettings();
119  plotter->SetPageSettings( pageInfo );
120  plotter->SetColorMode( getModeColor() );
121  plotter->SetColorSettings( colors );
122  // Currently, plot units are in decimil
123  plotter->SetViewport( aPlotOffset, IU_PER_MILS/10, aScale, false );
124 
125  // Init :
126  plotter->SetCreator( wxT( "Eeschema-DXF" ) );
127 
128  if( ! plotter->OpenFile( aFileName ) )
129  {
130  delete plotter;
131  return false;
132  }
133 
134  LOCALE_IO toggle;
135 
136  plotter->StartPlot();
137 
138  if( aPlotFrameRef )
139  {
140  COLOR4D color = plotter->GetColorMode() ?
143 
144  PlotWorkSheet( plotter, m_parent->GetTitleBlock(),
146  aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
148  aScreen->GetFileName(),
149  color );
150  }
151 
152  aScreen->Plot( plotter );
153 
154  // finish
155  plotter->EndPlot();
156  delete plotter;
157 
158  return true;
159 }
const wxString & GetFileName() const
Definition: sch_screen.h:157
int m_ScreenNumber
Definition: base_screen.h:135
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:180
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: common.h:202
virtual void SetViewport(const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the scale/position for the DXF plot The DXF engine doesn't support line widths and mirroring.
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
Definition: plotter.cpp:82
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
Definition: plotter.h:133
int color
Definition: DXF_plotter.cpp:61
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:152
void PlotWorkSheet(PLOTTER *plotter, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, int aSheetNumber, int aNumberOfSheets, const wxString &aSheetDesc, const wxString &aFilename, const COLOR4D aColor)
wxString GetScreenDesc() const override
Return a human-readable description of the current screen.
virtual bool StartPlot() override
Opens the DXF plot with a skeleton header.
COLOR_SETTINGS * ColorSettings()
Definition: plotter.h:145
PAGE_INFO describes the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
virtual bool EndPlot() override
void Plot(PLOTTER *aPlotter)
Plot all the schematic objects to aPlotter.
Definition: sch_screen.cpp:573
const PAGE_INFO & GetPageSettings() const override
COLOR4D GetColor(int aLayer) const
const TITLE_BLOCK & GetTitleBlock() const override
#define IU_PER_MILS
Definition: plotter.cpp:137
void SetColorSettings(COLOR_SETTINGS *aSettings)
Definition: plotter.h:143
int m_NumberOfScreens
Definition: base_screen.h:136
Definition: colors.h:45
static VRML_COLOR colors[VRML_COLOR_LAST]
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.h:147
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:40
bool GetColorMode() const
Definition: plotter.h:138

References BLACK, color, colors, PLOTTER::ColorSettings(), DXF_PLOTTER::EndPlot(), COLOR_SETTINGS::GetColor(), PLOTTER::GetColorMode(), SCH_SCREEN::GetFileName(), getModeColor(), SCH_SCREEN::GetPageSettings(), SCH_BASE_FRAME::GetPageSettings(), SCH_EDIT_FRAME::GetScreenDesc(), SCH_BASE_FRAME::GetTitleBlock(), IU_PER_MILS, LAYER_SCHEMATIC_WORKSHEET, DIALOG_PLOT_SCHEMATIC_BASE::m_colorTheme, BASE_SCREEN::m_NumberOfScreens, m_parent, BASE_SCREEN::m_ScreenNumber, PLOTTER::OpenFile(), SCH_SCREEN::Plot(), PlotWorkSheet(), PLOTTER::SetColorMode(), PLOTTER::SetColorSettings(), PLOTTER::SetCreator(), PLOTTER::SetPageSettings(), DXF_PLOTTER::SetViewport(), and DXF_PLOTTER::StartPlot().

Referenced by CreateDXFFile().

◆ plotOneSheetPDF()

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

Definition at line 150 of file plot_schematic_PDF.cpp.

153 {
154  if( m_plotBackgroundColor->GetValue() )
155  {
156  aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( LAYER_SCHEMATIC_BACKGROUND ) );
157  wxPoint end( aPlotter->PageSettings().GetWidthIU(),
158  aPlotter->PageSettings().GetHeightIU() );
159  aPlotter->Rect( wxPoint( 0, 0 ), end, FILLED_SHAPE, 1.0 );
160  }
161 
162  if( aPlotFrameRef )
163  {
164  COLOR4D color = aPlotter->GetColorMode() ?
167 
168  PlotWorkSheet( aPlotter, m_parent->GetTitleBlock(),
170  aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
172  aScreen->GetFileName(),
173  color );
174  }
175 
176  aScreen->Plot( aPlotter );
177 }
const wxString & GetFileName() const
Definition: sch_screen.h:157
int m_ScreenNumber
Definition: base_screen.h:135
virtual void SetColor(COLOR4D color)=0
int color
Definition: DXF_plotter.cpp:61
void PlotWorkSheet(PLOTTER *plotter, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, int aSheetNumber, int aNumberOfSheets, const wxString &aSheetDesc, const wxString &aFilename, const COLOR4D aColor)
wxString GetScreenDesc() const override
Return a human-readable description of the current screen.
COLOR_SETTINGS * ColorSettings()
Definition: plotter.h:145
void Plot(PLOTTER *aPlotter)
Plot all the schematic objects to aPlotter.
Definition: sch_screen.cpp:573
const PAGE_INFO & GetPageSettings() const override
COLOR4D GetColor(int aLayer) const
const TITLE_BLOCK & GetTitleBlock() const override
virtual void Rect(const wxPoint &p1, const wxPoint &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH)=0
int m_NumberOfScreens
Definition: base_screen.h:136
Definition: colors.h:45
PAGE_INFO & PageSettings()
Definition: plotter.h:152
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:40
bool GetColorMode() const
Definition: plotter.h:138

References BLACK, color, PLOTTER::ColorSettings(), FILLED_SHAPE, COLOR_SETTINGS::GetColor(), PLOTTER::GetColorMode(), SCH_SCREEN::GetFileName(), SCH_BASE_FRAME::GetPageSettings(), SCH_EDIT_FRAME::GetScreenDesc(), SCH_BASE_FRAME::GetTitleBlock(), LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_WORKSHEET, BASE_SCREEN::m_NumberOfScreens, m_parent, DIALOG_PLOT_SCHEMATIC_BASE::m_plotBackgroundColor, BASE_SCREEN::m_ScreenNumber, PLOTTER::PageSettings(), SCH_SCREEN::Plot(), PlotWorkSheet(), PLOTTER::Rect(), and PLOTTER::SetColor().

Referenced by createPDFFile().

◆ plotOneSheetPS()

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

Definition at line 132 of file plot_schematic_PS.cpp.

138 {
139  auto colors = static_cast<COLOR_SETTINGS*>(
140  m_colorTheme->GetClientData( m_colorTheme->GetSelection() ) );
141 
142  PS_PLOTTER* plotter = new PS_PLOTTER();
143  plotter->SetPageSettings( aPageInfo );
145  plotter->SetColorMode( getModeColor() );
146  plotter->SetColorSettings( colors );
147  // Currently, plot units are in decimil
148  plotter->SetViewport( aPlot0ffset, IU_PER_MILS/10, aScale, false );
149 
150  // Init :
151  plotter->SetCreator( wxT( "Eeschema-PS" ) );
152 
153  if( ! plotter->OpenFile( aFileName ) )
154  {
155  delete plotter;
156  return false;
157  }
158 
159  LOCALE_IO toggle; // Switch the locale to standard C
160 
161  plotter->StartPlot();
162 
164  {
165  plotter->SetColor( plotter->ColorSettings()->GetColor( LAYER_SCHEMATIC_BACKGROUND ) );
166  wxPoint end( plotter->PageSettings().GetWidthIU(),
167  plotter->PageSettings().GetHeightIU() );
168  plotter->Rect( wxPoint( 0, 0 ), end, FILLED_SHAPE, 1.0 );
169  }
170 
171  if( aPlotFrameRef )
172  {
173  COLOR4D color = plotter->GetColorMode() ?
176 
177  PlotWorkSheet( plotter, m_parent->GetTitleBlock(),
179  aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
181  aScreen->GetFileName(),
182  color );
183  }
184 
185  aScreen->Plot( plotter );
186 
187  plotter->EndPlot();
188  delete plotter;
189 
190  return true;
191 }
virtual void SetViewport(const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
Definition: PS_plotter.cpp:412
const wxString & GetFileName() const
Definition: sch_screen.h:157
int m_ScreenNumber
Definition: base_screen.h:135
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:180
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: common.h:202
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
Definition: plotter.cpp:82
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
Definition: plotter.h:133
int color
Definition: DXF_plotter.cpp:61
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i....
virtual bool EndPlot() override
Definition: PS_plotter.cpp:967
void PlotWorkSheet(PLOTTER *plotter, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, int aSheetNumber, int aNumberOfSheets, const wxString &aSheetDesc, const wxString &aFilename, const COLOR4D aColor)
wxString GetScreenDesc() const override
Return a human-readable description of the current screen.
virtual bool StartPlot() override
The code within this function (and the CloseFilePS function) creates postscript files whose contents ...
Definition: PS_plotter.cpp:813
virtual void SetDefaultLineWidth(int width) override
Set the default line width.
Definition: PS_plotter.cpp:53
COLOR_SETTINGS * ColorSettings()
Definition: plotter.h:145
virtual void SetColor(COLOR4D color) override
The SetColor implementation is split with the subclasses: The PSLIKE computes the rgb values,...
Definition: PS_plotter.cpp:60
void Plot(PLOTTER *aPlotter)
Plot all the schematic objects to aPlotter.
Definition: sch_screen.cpp:573
const PAGE_INFO & GetPageSettings() const override
COLOR4D GetColor(int aLayer) const
virtual void Rect(const wxPoint &p1, const wxPoint &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
Definition: PS_plotter.cpp:580
const TITLE_BLOCK & GetTitleBlock() const override
#define IU_PER_MILS
Definition: plotter.cpp:137
void SetColorSettings(COLOR_SETTINGS *aSettings)
Definition: plotter.h:143
int m_NumberOfScreens
Definition: base_screen.h:136
Definition: colors.h:45
PAGE_INFO & PageSettings()
Definition: plotter.h:152
static VRML_COLOR colors[VRML_COLOR_LAST]
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.h:147
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:40
bool GetColorMode() const
Definition: plotter.h:138

References BLACK, color, colors, PLOTTER::ColorSettings(), PS_PLOTTER::EndPlot(), FILLED_SHAPE, COLOR_SETTINGS::GetColor(), PLOTTER::GetColorMode(), GetDefaultLineThickness(), SCH_SCREEN::GetFileName(), getModeColor(), SCH_BASE_FRAME::GetPageSettings(), SCH_EDIT_FRAME::GetScreenDesc(), SCH_BASE_FRAME::GetTitleBlock(), IU_PER_MILS, LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_WORKSHEET, DIALOG_PLOT_SCHEMATIC_BASE::m_colorTheme, BASE_SCREEN::m_NumberOfScreens, m_parent, DIALOG_PLOT_SCHEMATIC_BASE::m_plotBackgroundColor, BASE_SCREEN::m_ScreenNumber, PLOTTER::OpenFile(), PLOTTER::PageSettings(), SCH_SCREEN::Plot(), PlotWorkSheet(), PS_PLOTTER::Rect(), PSLIKE_PLOTTER::SetColor(), PLOTTER::SetColorMode(), PLOTTER::SetColorSettings(), PLOTTER::SetCreator(), PSLIKE_PLOTTER::SetDefaultLineWidth(), PLOTTER::SetPageSettings(), PS_PLOTTER::SetViewport(), and PS_PLOTTER::StartPlot().

Referenced by createPSFile().

◆ plotOneSheetSVG()

bool DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG ( EDA_DRAW_FRAME aFrame,
const wxString &  aFileName,
SCH_SCREEN aScreen,
bool  aPlotBlackAndWhite,
bool  aPlotFrameRef,
bool  aPlotBackgroundColor = false,
COLOR_SETTINGS aColors = nullptr 
)
static

Definition at line 105 of file plot_schematic_SVG.cpp.

112 {
113  SVG_PLOTTER* plotter = new SVG_PLOTTER();
114 
115  if( !aColors )
116  aColors = aFrame->GetColorSettings();
117 
118  const PAGE_INFO& pageInfo = aScreen->GetPageSettings();
119  plotter->SetPageSettings( pageInfo );
121  plotter->SetColorMode( aPlotBlackAndWhite ? false : true );
122  plotter->SetColorSettings( aColors );
123  wxPoint plot_offset;
124  double scale = 1.0;
125  // Currently, plot units are in decimil
126  plotter->SetViewport( plot_offset, IU_PER_MILS/10, scale, false );
127 
128  // Init :
129  plotter->SetCreator( wxT( "Eeschema-SVG" ) );
130 
131  if( ! plotter->OpenFile( aFileName ) )
132  {
133  delete plotter;
134  return false;
135  }
136 
137  LOCALE_IO toggle;
138 
139  plotter->StartPlot();
140 
141  if( aPlotBackgroundColor )
142  {
143  plotter->SetColor( plotter->ColorSettings()->GetColor( LAYER_SCHEMATIC_BACKGROUND ) );
144  wxPoint end( plotter->PageSettings().GetWidthIU(),
145  plotter->PageSettings().GetHeightIU() );
146  plotter->Rect( wxPoint( 0, 0 ), end, FILLED_SHAPE, 1.0 );
147  }
148 
149  if( aPlotFrameRef )
150  {
151  COLOR4D color = plotter->GetColorMode() ?
154 
155  PlotWorkSheet( plotter, aFrame->GetTitleBlock(),
156  aFrame->GetPageSettings(),
157  aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
158  aFrame->GetScreenDesc(),
159  aScreen->GetFileName(),
160  color );
161  }
162 
163  aScreen->Plot( plotter );
164 
165  plotter->EndPlot();
166  delete plotter;
167 
168  return true;
169 }
const wxString & GetFileName() const
Definition: sch_screen.h:157
int m_ScreenNumber
Definition: base_screen.h:135
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:180
virtual const TITLE_BLOCK & GetTitleBlock() const =0
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Definition: common.h:202
virtual void SetViewport(const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
Definition: plotter.cpp:82
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
Definition: plotter.h:133
int color
Definition: DXF_plotter.cpp:61
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i....
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:152
virtual void Rect(const wxPoint &p1, const wxPoint &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
void PlotWorkSheet(PLOTTER *plotter, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, int aSheetNumber, int aNumberOfSheets, const wxString &aSheetDesc, const wxString &aFilename, const COLOR4D aColor)
virtual bool EndPlot() override
virtual const PAGE_INFO & GetPageSettings() const =0
virtual void SetColor(COLOR4D color) override
The SetColor implementation is split with the subclasses: The PSLIKE computes the rgb values,...
virtual void SetDefaultLineWidth(int width) override
Set the default line width.
Definition: PS_plotter.cpp:53
COLOR_SETTINGS * ColorSettings()
Definition: plotter.h:145
PAGE_INFO describes the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
virtual bool StartPlot() override
The code within this function creates SVG files header.
void Plot(PLOTTER *aPlotter)
Plot all the schematic objects to aPlotter.
Definition: sch_screen.cpp:573
COLOR4D GetColor(int aLayer) const
const int scale
#define IU_PER_MILS
Definition: plotter.cpp:137
void SetColorSettings(COLOR_SETTINGS *aSettings)
Definition: plotter.h:143
virtual COLOR_SETTINGS * GetColorSettings()
Returns a pointer to the active color theme settings.
int m_NumberOfScreens
Definition: base_screen.h:136
Definition: colors.h:45
PAGE_INFO & PageSettings()
Definition: plotter.h:152
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.h:147
virtual wxString GetScreenDesc() const
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:40
bool GetColorMode() const
Definition: plotter.h:138

References BLACK, color, PLOTTER::ColorSettings(), SVG_PLOTTER::EndPlot(), FILLED_SHAPE, COLOR_SETTINGS::GetColor(), PLOTTER::GetColorMode(), EDA_DRAW_FRAME::GetColorSettings(), GetDefaultLineThickness(), SCH_SCREEN::GetFileName(), SCH_SCREEN::GetPageSettings(), EDA_DRAW_FRAME::GetPageSettings(), EDA_DRAW_FRAME::GetScreenDesc(), EDA_DRAW_FRAME::GetTitleBlock(), IU_PER_MILS, LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_WORKSHEET, BASE_SCREEN::m_NumberOfScreens, BASE_SCREEN::m_ScreenNumber, PLOTTER::OpenFile(), PLOTTER::PageSettings(), SCH_SCREEN::Plot(), PlotWorkSheet(), SVG_PLOTTER::Rect(), scale, SVG_PLOTTER::SetColor(), PLOTTER::SetColorMode(), PLOTTER::SetColorSettings(), PLOTTER::SetCreator(), PSLIKE_PLOTTER::SetDefaultLineWidth(), PLOTTER::SetPageSettings(), SVG_PLOTTER::SetViewport(), and SVG_PLOTTER::StartPlot().

Referenced by createSVGFile().

◆ PlotSchematic()

void DIALOG_PLOT_SCHEMATIC::PlotSchematic ( bool  aPlotAll)
private

Definition at line 319 of file dialog_plot_schematic.cpp.

320 {
321  getPlotOptions();
322 
323  switch( GetPlotFileFormat() )
324  {
325  default:
326  case PLOT_FORMAT::POST:
327  createPSFile( aPlotAll, getPlotFrameRef() );
328  break;
329  case PLOT_FORMAT::DXF:
330  CreateDXFFile( aPlotAll, getPlotFrameRef() );
331  break;
332  case PLOT_FORMAT::PDF:
333  createPDFFile( aPlotAll, getPlotFrameRef() );
334  break;
335  case PLOT_FORMAT::SVG:
336  createSVGFile( aPlotAll, getPlotFrameRef() );
337  break;
338  case PLOT_FORMAT::HPGL:
339  createHPGLFile( aPlotAll, getPlotFrameRef() );
340  break;
341  }
342 }
void CreateDXFFile(bool aPlotAll, bool aPlotFrameRef)
void createHPGLFile(bool aPlotAll, bool aPlotFrameRef)
void createPDFFile(bool aPlotAll, bool aPlotFrameRef)
void createPSFile(bool aPlotAll, bool aPlotFrameRef)
void createSVGFile(bool aPlotAll, bool aPlotFrameRef)

References CreateDXFFile(), createHPGLFile(), createPDFFile(), createPSFile(), createSVGFile(), DXF, GetPlotFileFormat(), getPlotFrameRef(), getPlotOptions(), HPGL, PDF, POST, and SVG.

Referenced by OnPlotAll(), and OnPlotCurrent().

◆ Prj()

PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

Function Prj returns a reference to the PROJECT "associated with" this KIWAY.

Definition at line 35 of file kiway_holder.cpp.

36 {
37  return Kiway().Prj();
38 }
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_holder.h:56
VTBL_ENTRY PROJECT & Prj() const
Function Prj returns the PROJECT associated with this KIWAY.
Definition: kiway.cpp:171

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

Referenced by PCB_BASE_EDIT_FRAME::AddLibrary(), LIB_MANAGER::addLibrary(), LIB_CONTROL::AddSymbolToSchematic(), SCH_EDIT_FRAME::AppendSchematic(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), DIALOG_SYMBOL_REMAP::backupProject(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_FOOTPRINT_FP_EDITOR::Cfg3DPath(), DIALOG_FOOTPRINT_BOARD_EDITOR::Cfg3DPath(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), KICAD_MANAGER_FRAME::CreateNewProject(), createPlotFileName(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromLibrary(), DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), LIB_VIEW_FRAME::DisplayLibInfos(), CVPCB_MAINFRAME::DisplayStatus(), PCB_EDIT_FRAME::doAutoSave(), KICAD_MANAGER_CONTROL::Execute(), PCB_EDIT_FRAME::Export_IDF3(), LIB_CONTROL::ExportSymbolAsSVG(), LIB_CONTROL::ExportView(), PCB_EDIT_FRAME::ExportVRML_File(), PCB_EDIT_FRAME::Files_io_from_id(), PCB_EDIT_FRAME::GenD356File(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), LIB_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), SCH_BASE_FRAME::GetLibPart(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), KICAD_MANAGER_FRAME::GetProjectFileName(), LIB_VIEW_FRAME::GetSelectedSymbol(), FP_THREAD_IFACE::GetTable(), PCB_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::importFile(), SCH_EDITOR_CONTROL::ImportFPAssignments(), FOOTPRINT_EDIT_FRAME::initLibraryTree(), LIB_EDIT_FRAME::KiwayMailIn(), EDA_DRAW_FRAME::LibraryFileBrowser(), LIB_EDIT_FRAME::LoadComponentFromCurrentLib(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), LIB_EDIT_FRAME::LoadOneSymbol(), KICAD_MANAGER_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProject(), SCH_EDIT_FRAME::LoadProjectFile(), CVPCB_MAINFRAME::LoadProjectFile(), PCB_EDIT_FRAME::LoadProjectSettings(), SCH_EDIT_FRAME::LoadSheetFromFile(), DIALOG_FOOTPRINT_FP_EDITOR::On3DModelCellChanged(), DIALOG_FOOTPRINT_BOARD_EDITOR::On3DModelCellChanged(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DModel(), DIALOG_FOOTPRINT_BOARD_EDITOR::OnAdd3DModel(), KICAD_MANAGER_FRAME::OnBrowseInFileExplorer(), DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton(), SCH_EDIT_FRAME::OnCloseWindow(), DIALOG_GENDRILL::OnGenReportFile(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), SCH_EDIT_FRAME::OnOpenCvpcb(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), DIALOG_NETLIST::OnOpenNetlistClick(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_EXPORT_SVG::OnOutputDirectoryBrowseClicked(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), OnOutputDirectoryBrowseClicked(), DIALOG_GEN_FOOTPRINT_POSITION::OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), DIALOG_BOM::OnRunGenerator(), FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng(), DIALOG_ERC::OnSaveReport(), DIALOG_DRC::OnSaveReport(), DIALOG_SPICE_MODEL::onSelectLibrary(), LIB_VIEW_FRAME::OnSelectSymbol(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PANEL_PREV_3D::PANEL_PREV_3D(), SCH_EDITOR_CONTROL::Paste(), MODULE_EDITOR_TOOLS::PasteFootprint(), PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME(), SCH_DRAWING_TOOLS::PlaceComponent(), DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector(), SCH_EDIT_FRAME::Print(), SCH_EDIT_FRAME::PrintPage(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), LIB_VIEW_FRAME::ReCreateListCmp(), LIB_VIEW_FRAME::ReCreateListLib(), EDA_3D_VIEWER::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), SCH_EDIT_FRAME::RescueLegacyProject(), SCH_EDIT_FRAME::RescueSymbolLibTableProject(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), LIB_EDIT_FRAME::saveLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), LIB_EDIT_FRAME::savePartAs(), SCH_EDIT_FRAME::SaveProject(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), DIALOG_BOARD_STATISTICS::saveReportClicked(), SCH_BASE_FRAME::saveSymbolLibTables(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), SCH_BASE_FRAME::SelectCompFromLibTree(), PCB_BASE_FRAME::SelectLibrary(), LIB_EDIT_FRAME::SelectLibraryFromList(), LIB_EDIT_FRAME::selectSymLibTable(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), LIB_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), LIB_EDIT_FRAME::SetCurPart(), KICAD_MANAGER_FRAME::SetProjectFileName(), EE_INSPECTION_TOOL::ShowDatasheet(), DIALOG_CHOOSE_COMPONENT::ShowFootprintFor(), LIB_VIEW_FRAME::ShowModal(), FOOTPRINT_VIEWER_FRAME::ShowModal(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::symTable(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), FOOTPRINT_EDIT_FRAME::SyncLibraryTree(), EDA_3D_VIEWER::takeScreenshot(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow(), NETLIST_DIALOG::TransferDataFromWindow(), DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow(), DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::UpdateFieldsFromLibrary(), SIM_PLOT_FRAME::updateNetlistExporter(), SCH_SCREEN::UpdateSymbolLinks(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), SCH_EDIT_FRAME::UpdateTitle(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::Validate(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_BOARD_EDITOR::~DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::~DIALOG_FOOTPRINT_FP_EDITOR(), and PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME().

◆ PrjConfigChanged()

bool DIALOG_PLOT_SCHEMATIC::PrjConfigChanged ( )
inline

Definition at line 63 of file dialog_plot_schematic.h.

63 { return m_configChanged; } // return true if the prj config was modified

References m_configChanged.

Referenced by SCH_EDIT_FRAME::PlotSchematic().

◆ 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 237 of file dialog_shim.cpp.

238 {
239  const char* hash_key;
240 
241  if( m_hash_key.size() )
242  {
243  // a special case like EDA_LIST_DIALOG, which has multiple uses.
244  hash_key = m_hash_key.c_str();
245  }
246  else
247  {
248  hash_key = typeid(*this).name();
249  }
250 
251  RECT_MAP::iterator it = class_map.find( hash_key );
252 
253  if( it == class_map.end() )
254  return;
255 
256  EDA_RECT rect = it->second;
257  rect.SetSize( 0, 0 );
258  class_map[ hash_key ] = rect;
259 }
std::string m_hash_key
Definition: dialog_shim.h:197
static RECT_MAP class_map
void SetSize(const wxSize &size)
Definition: eda_rect.h:144
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44

References class_map, DIALOG_SHIM::m_hash_key, and EDA_RECT::SetSize().

Referenced by DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY().

◆ 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 137 of file plot_schematic_PDF.cpp.

139 {
140  aPlotter->EndPlot();
141  delete aPlotter;
142 
143  // Restore the previous sheet
144  m_parent->SetCurrentSheet( aOldsheetpath );
147 }
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
virtual bool EndPlot() override
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
SCH_SHEET_PATH & GetCurrentSheet()
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.

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 75 of file plot_schematic_HPGL.cpp.

76 {
78 
79  if( m_HPGLPenSize > Millimeter2iu( 2 ) )
80  m_HPGLPenSize = Millimeter2iu( 2 );
81 
82  if( m_HPGLPenSize < Millimeter2iu( 0.01 ) )
83  m_HPGLPenSize = Millimeter2iu( 0.01 );
84 }
virtual long long int GetValue()
Function GetValue Returns the current value in Internal Units.

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

Referenced by createHPGLFile().

◆ 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 115 of file dialog_shim.h.

116  {
117  m_initialFocusTarget = aWindow;
118  }
wxWindow * m_initialFocusTarget
Definition: dialog_shim.h:203

References DIALOG_SHIM::m_initialFocusTarget.

Referenced by DIALOG_BOM::DIALOG_BOM(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(), DIALOG_EDIT_SHEET_PIN::DIALOG_EDIT_SHEET_PIN(), DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_FIND::DIALOG_FIND(), DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR(), DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR(), DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM(), DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN(), DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_PAD_PRIMITIVES_PROPERTIES::DIALOG_PAD_PRIMITIVES_PROPERTIES(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE(), DIALOG_SCH_FIND::DIALOG_SCH_FIND(), DIALOG_SET_GRID::DIALOG_SET_GRID(), DIALOG_TARGET_PROPERTIES::DIALOG_TARGET_PROPERTIES(), DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), DIALOG_EDIT_ONE_FIELD::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(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), LIB_EDIT_FRAME::savePartAs(), DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataToWindow(), DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow(), and DIALOG_COPPER_ZONE::TransferDataToWindow().

◆ SetKiway()

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

Function SetKiway.

Parameters
aDestis the recipient of aKiway pointer. It is only used for debugging, since "this" is not a wxWindow*. "this" is a KIWAY_HOLDER mix-in.
aKiwayis often from a parent window, or from KIFACE::CreateWindow().

Definition at line 42 of file kiway_holder.cpp.

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

References KIWAY_HOLDER::m_kiway, and name.

Referenced by BM2CMP_FRAME::BM2CMP_FRAME(), InvokePcbLibTableEditor(), 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 80 of file dialog_plot_schematic.h.

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

References DIALOG_PLOT_SCHEMATIC_BASE::m_ModeColorOption.

Referenced by initDlg().

◆ setPlotFrameRef()

void DIALOG_PLOT_SCHEMATIC::setPlotFrameRef ( bool  aPlot)
inlineprivate

Definition at line 91 of file dialog_plot_schematic.h.

91 {m_PlotFrameRefOpt->SetValue( aPlot ); }

References DIALOG_PLOT_SCHEMATIC_BASE::m_PlotFrameRefOpt.

Referenced by initDlg().

◆ SetPlotOriginCenter()

void DIALOG_PLOT_SCHEMATIC::SetPlotOriginCenter ( bool  aCenter)
inlineprivate

Definition at line 118 of file dialog_plot_schematic.h.

119  {
120  m_plotOriginOpt->SetSelection( aCenter ? 1 : 0 );
121  }

References DIALOG_PLOT_SCHEMATIC_BASE::m_plotOriginOpt.

Referenced by initDlg().

◆ 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 151 of file dialog_shim.cpp.

152 {
153  wxSize sz( x, y );
154  SetSize( ConvertDialogToPixels( sz ) );
155 }

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 180 of file plot_schematic_PDF.cpp.

181 {
182  PAGE_INFO plotPage; // page size selected to plot
183  // Considerations on page size and scaling requests
184  const PAGE_INFO& actualPage = aScreen->GetPageSettings(); // page size selected in schematic
185 
186  switch( m_pageSizeSelect )
187  {
188  case PAGE_SIZE_A:
189  plotPage.SetType( wxT( "A" ) );
190  plotPage.SetPortrait( actualPage.IsPortrait() );
191  break;
192 
193  case PAGE_SIZE_A4:
194  plotPage.SetType( wxT( "A4" ) );
195  plotPage.SetPortrait( actualPage.IsPortrait() );
196  break;
197 
198  case PAGE_SIZE_AUTO:
199  default:
200  plotPage = actualPage;
201  break;
202  }
203 
204  double scalex = (double) plotPage.GetWidthMils() / actualPage.GetWidthMils();
205  double scaley = (double) plotPage.GetHeightMils() / actualPage.GetHeightMils();
206  double scale = std::min( scalex, scaley );
207  aPlotter->SetPageSettings( plotPage );
208  // Currently, plot units are in decimil
209  aPlotter->SetViewport( wxPoint( 0, 0 ), IU_PER_MILS/10, scale, false );
210 }
int GetHeightMils() const
Definition: page_info.h:140
bool SetType(const wxString &aStandardPageDescriptionName, bool aIsPortrait=false)
Function SetType sets the name of the page type and also the sizes and margins commonly associated wi...
Definition: page_info.cpp:117
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:152
PAGE_INFO describes the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
virtual void SetViewport(const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror)=0
Set the plot offset and scaling for the current plot.
const int scale
bool IsPortrait() const
Definition: page_info.h:121
#define IU_PER_MILS
Definition: plotter.cpp:137
void SetPortrait(bool aIsPortrait)
Function SetPortrait will rotate the paper page 90 degrees.
Definition: page_info.cpp:182
int GetWidthMils() const
Definition: page_info.h:137
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.h:147

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().

◆ Show()

bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 178 of file dialog_shim.cpp.

179 {
180  bool ret;
181  const char* hash_key;
182 
183  if( m_hash_key.size() )
184  {
185  // a special case like EDA_LIST_DIALOG, which has multiple uses.
186  hash_key = m_hash_key.c_str();
187  }
188  else
189  {
190  hash_key = typeid(*this).name();
191  }
192 
193  // Show or hide the window. If hiding, save current position and size.
194  // If showing, use previous position and size.
195  if( show )
196  {
197 #ifndef __WINDOWS__
198  wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
199 #endif
200  ret = wxDialog::Show( show );
201 
202  // classname is key, returns a zeroed out default EDA_RECT if none existed before.
203  EDA_RECT savedDialogRect = class_map[ hash_key ];
204 
205  if( savedDialogRect.GetSize().x != 0 && savedDialogRect.GetSize().y != 0 )
206  {
207  SetSize( savedDialogRect.GetPosition().x,
208  savedDialogRect.GetPosition().y,
209  std::max( wxDialog::GetSize().x, savedDialogRect.GetSize().x ),
210  std::max( wxDialog::GetSize().y, savedDialogRect.GetSize().y ),
211  0 );
212  }
213 
214  // Be sure that the dialog appears in a visible area
215  // (the dialog position might have been stored at the time when it was
216  // shown on another display)
217  if( wxDisplay::GetFromWindow( this ) == wxNOT_FOUND )
218  Centre();
219  }
220  else
221  {
222  // Save the dialog's position & size before hiding, using classname as key
223  class_map[ hash_key ] = EDA_RECT( wxDialog::GetPosition(), wxDialog::GetSize() );
224 
225 #ifdef __WXMAC__
226  if ( m_eventLoop )
227  m_eventLoop->Exit( GetReturnCode() ); // Needed for APP-MODAL dlgs on OSX
228 #endif
229 
230  ret = wxDialog::Show( show );
231  }
232 
233  return ret;
234 }
std::string m_hash_key
Definition: dialog_shim.h:197
static RECT_MAP class_map
const wxPoint GetPosition() const
Definition: eda_rect.h:115
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
const wxSize GetSize() const
Definition: eda_rect.h:103

References class_map, EDA_RECT::GetPosition(), EDA_RECT::GetSize(), DIALOG_SHIM::m_hash_key, wxPoint::x, and wxPoint::y.

Referenced by DIALOG_SHIM::EndQuasiModal(), InvokeDialogERC(), SCH_EDIT_FRAME::OnAnnotate(), DIALOG_DRC::OnDRCItemDClick(), DIALOG_ERC::OnERCItemDClick(), DIALOG_CLEANUP_TRACKS_AND_VIAS::OnLeftDClickItem(), POSITION_RELATIVE_TOOL::PositionRelative(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), DRC::ShowDRCDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), DIALOG_SHIM::ShowQuasiModal(), DIALOG_POSITION_RELATIVE::UpdateAnchor(), and SCH_EDIT_FRAME::UpdateHierarchyNavigator().

◆ ShowQuasiModal()

int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 365 of file dialog_shim.cpp.

366 {
367  // This is an exception safe way to zero a pointer before returning.
368  // Yes, even though DismissModal() clears this first normally, this is
369  // here in case there's an exception before the dialog is dismissed.
370  struct NULLER
371  {
372  void*& m_what;
373  NULLER( void*& aPtr ) : m_what( aPtr ) {}
374  ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction
375  } clear_this( (void*&) m_qmodal_loop );
376 
377  // release the mouse if it's currently captured as the window having it
378  // will be disabled when this dialog is shown -- but will still keep the
379  // capture making it impossible to do anything in the modal dialog itself
380  wxWindow* win = wxWindow::GetCapture();
381  if( win )
382  win->ReleaseMouse();
383 
384  // Get the optimal parent
385  wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
386 
387  // Show the optimal parent
388  DBG( if( parent ) printf( "%s: optimal parent: %s\n", __func__, typeid(*parent).name() );)
389 
390  wxASSERT_MSG( !m_qmodal_parent_disabler,
391  wxT( "Caller using ShowQuasiModal() twice on same window?" ) );
392 
393  // quasi-modal: disable only my "optimal" parent
395 
396 #ifdef __WXMAC__
397  // Apple in its infinite wisdom will raise a disabled window before even passing
398  // us the event, so we have no way to stop it. Instead, we must set an order on
399  // the windows so that the quasi-modal will be pushed in front of the disabled
400  // window when it is raised.
401  ReparentQuasiModal();
402 #endif
403  Show( true );
404 
405  m_qmodal_showing = true;
406 
407  WX_EVENT_LOOP event_loop;
408 
409  m_qmodal_loop = &event_loop;
410 
411  event_loop.Run();
412 
413  m_qmodal_showing = false;
414 
415  return GetReturnCode();
416 }
bool m_qmodal_showing
Definition: dialog_shim.h:207
#define WX_EVENT_LOOP
Definition: kiway_player.h:41
WX_EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:205
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:208
Toggle a window's "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:35
#define DBG(x)
Definition: fctsys.h:33

References DBG, DIALOG_SHIM::m_qmodal_loop, DIALOG_SHIM::m_qmodal_parent_disabler, DIALOG_SHIM::m_qmodal_showing, DIALOG_SHIM::Show(), and WX_EVENT_LOOP.

Referenced by PCB_EDIT_FRAME::DoShowBoardSetupDialog(), SCH_EDIT_FRAME::DoShowSchematicSetupDialog(), LIB_EDIT_TOOL::editFieldProperties(), SCH_EDITOR_CONTROL::EditSymbolFields(), LIB_EDIT_TOOL::editSymbolProperties(), GLOBAL_EDIT_TOOL::EditTracksAndVias(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), PCB_EDIT_FRAME::InstallExchangeModuleFrame(), PCB_BASE_FRAME::InstallPadOptionsFrame(), InvokeDialogEditComponentsLibId(), InvokeDialogRescueEach(), InvokeDialogUpdateFields(), SCH_EDIT_FRAME::OnRemapSymbols(), LIB_VIEW_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SCH_BASE_FRAME::SelectCompFromLibTree(), and PCB_BASE_FRAME::SelectFootprintFromLibTree().

◆ VertPixelsFromDU()

int DIALOG_SHIM::VertPixelsFromDU ( int  y)
protectedinherited

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

See SetSizeInDU or wxDialog documentation for more information.

Definition at line 165 of file dialog_shim.cpp.

166 {
167  wxSize sz( 0, y );
168  return ConvertDialogToPixels( sz ).y;
169 }

Referenced by DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT().

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

Definition at line 50 of file dialog_plot_schematic.h.

Referenced by DIALOG_PLOT_SCHEMATIC(), getPlotOptions(), and PrjConfigChanged().

◆ m_defaultLineWidth

UNIT_BINDER DIALOG_PLOT_SCHEMATIC::m_defaultLineWidth
private

Definition at line 56 of file dialog_plot_schematic.h.

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

◆ m_firstPaintEvent

bool DIALOG_SHIM::m_firstPaintEvent
protectedinherited

Definition at line 202 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 53 of file dialog_plot_schematic.h.

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

◆ m_HPGLPenSize

double DIALOG_PLOT_SCHEMATIC::m_HPGLPenSize
private

Definition at line 54 of file dialog_plot_schematic.h.

Referenced by getPlotOptions(), initDlg(), Plot_1_Page_HPGL(), and SetHPGLPenWidth().

◆ m_initialFocusTarget

wxWindow* DIALOG_SHIM::m_initialFocusTarget
protectedinherited

Definition at line 203 of file dialog_shim.h.

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

◆ 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

WX_HTML_REPORT_PANEL* DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox
protectedinherited

◆ 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_penWidth

UNIT_BINDER DIALOG_PLOT_SCHEMATIC::m_penWidth
private

Definition at line 57 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_plotFormat

PLOT_FORMAT DIALOG_PLOT_SCHEMATIC::m_plotFormat
private

Definition at line 51 of file dialog_plot_schematic.h.

Referenced by OnUpdateUI().

◆ m_plotFormatOpt

wxRadioBox* DIALOG_PLOT_SCHEMATIC_BASE::m_plotFormatOpt
protectedinherited

◆ m_PlotFrameRefOpt

wxCheckBox* DIALOG_PLOT_SCHEMATIC_BASE::m_PlotFrameRefOpt
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 205 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 207 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_units


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