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 Member Functions

 DIALOG_PLOT_SCHEMATIC (SCH_EDIT_FRAME *parent)
 
bool PrjConfigChanged ()
 
int ShowQuasiModal ()
 
void EndQuasiModal (int retCode)
 
bool IsQuasiModal ()
 
bool Show (bool show) override
 
bool Enable (bool enable) override
 
void OnPaint (wxPaintEvent &event)
 
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)
 

Protected Types

enum  { wxID_PRINT_CURRENT = 1000, wxID_PRINT_ALL }
 

Protected Member Functions

virtual void OnCloseWindow (wxCloseEvent &event)
 
virtual void OnHPGLPageSelected (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...
 

Protected Attributes

wxStaticText * m_staticTextOutputDirectory
 
wxTextCtrl * m_outputDirectoryName
 
wxBitmapButton * m_browseButton
 
wxBoxSizer * m_optionsSizer
 
wxRadioBox * m_plotFormatOpt
 
wxStaticBoxSizer * m_paperOptionsSizer
 
wxRadioBox * m_PaperSizeOption
 
wxStaticBoxSizer * m_paperHPGLSizer
 
wxStaticText * m_staticText4
 
wxChoice * m_HPGLPaperSizeOption
 
wxRadioBox * m_plotOriginOpt
 
wxStaticText * m_penHPLGWidthTitle
 
wxTextCtrl * m_penHPGLWidthCtrl
 
wxStaticText * m_defaultLineWidthTitle
 
wxTextCtrl * m_DefaultLineSizeCtrl
 
wxRadioBox * m_ModeColorOption
 
wxCheckBox * m_PlotFrameRefOpt
 
wxBoxSizer * m_ButtonsSizer
 
wxButton * m_buttonPlotCurrent
 
wxButton * m_buttonPlotAll
 
wxButton * m_buttonQuit
 
WX_HTML_REPORT_PANELm_MessagesBox
 
bool m_fixupsRun
 
std::string m_hash_key
 
EVENT_LOOPm_qmodal_loop
 
bool m_qmodal_showing
 
WDO_ENABLE_DISABLEm_qmodal_parent_disabler
 

Private Member Functions

void OnPlotFormatSelection (wxCommandEvent &event) override
 
void OnButtonPlotCurrentClick (wxCommandEvent &event) override
 
void OnButtonPlotAllClick (wxCommandEvent &event) override
 
void OnButtonCancelClick (wxCommandEvent &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...
 
PlotFormat 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
 
wxConfigBase * m_config
 
bool m_configChanged
 
int m_HPGLPaperSizeSelect
 
double m_HPGLPenSize
 

Static Private Attributes

static int m_pageSizeSelect = PAGE_SIZE_AUTO
 

Detailed Description

Definition at line 46 of file dialog_plot_schematic.h.

Member Enumeration Documentation

anonymous enum
protectedinherited

Constructor & Destructor Documentation

DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC ( SCH_EDIT_FRAME parent)

Definition at line 66 of file dialog_plot_schematic.cpp.

References DIALOG_SHIM::FinishDialogSettings(), initDlg(), Kiface(), KIFACE_I::KifaceSettings(), m_config, m_configChanged, and m_parent.

66  :
68 {
69  m_parent = parent;
70  m_configChanged = false;
72 
73  initDlg();
74 
75  // Now all widgets have the size fixed, call FinishDialogSettings
77 }
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
Definition: kicad.cpp:52
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)
wxConfigBase * KifaceSettings() const
Definition: kiface_i.h:103

Member Function Documentation

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

Definition at line 38 of file plot_schematic_DXF.cpp.

References SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), g_RootSheet, GetChars(), 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(), REPORTER::RPT_ACTION, REPORTER::RPT_ERROR, SCH_EDIT_FRAME::SetCurrentSheet(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), SCH_SHEET_PATH::UpdateAllScreenReferences(), and IO_ERROR::What().

Referenced by PlotSchematic(), and setPlotFrameRef().

39 {
40  SCH_EDIT_FRAME* schframe = m_parent;
41  SCH_SCREEN* screen = schframe->GetScreen();
42  SCH_SHEET_PATH oldsheetpath = schframe->GetCurrentSheet();
43 
44  /* When printing all pages, the printed page is not the current page.
45  * In complex hierarchies, we must setup references and others parameters
46  * in the printed SCH_SCREEN
47  * because in complex hierarchies a SCH_SCREEN (a schematic drawings)
48  * is shared between many sheets
49  */
50  SCH_SHEET_LIST sheetList;
51 
52  if( aPlotAll )
53  sheetList.BuildSheetList( g_RootSheet );
54  else
55  sheetList.push_back( schframe->GetCurrentSheet() );
56 
57  REPORTER& reporter = m_MessagesBox->Reporter();
58 
59  for( unsigned i = 0; i < sheetList.size(); i++ )
60  {
61  schframe->SetCurrentSheet( sheetList[i] );
63  schframe->SetSheetNumberAndCount();
64  screen = schframe->GetCurrentSheet().LastScreen();
65 
66  wxPoint plot_offset;
67  wxString msg;
68 
69  try
70  {
71  wxString fname = schframe->GetUniqueFilenameForCurrentSheet();
72  wxString ext = DXF_PLOTTER::GetDefaultFileExtension();
73  wxFileName plotFileName = createPlotFileName( m_outputDirectoryName, fname,
74  ext, &reporter );
75 
76  if( PlotOneSheetDXF( plotFileName.GetFullPath(), screen, plot_offset, 1.0,
77  aPlotFrameRef ) )
78  {
79  msg.Printf( _( "Plot: \"%s\" OK.\n" ), GetChars( plotFileName.GetFullPath() ) );
80  reporter.Report( msg, REPORTER::RPT_ACTION );
81  }
82  else // Error
83  {
84  msg.Printf( _( "Unable to create file \"%s\".\n" ),
85  GetChars( plotFileName.GetFullPath() ) );
86  reporter.Report( msg, REPORTER::RPT_ERROR );
87  }
88  }
89  catch( IO_ERROR& e )
90  {
91  msg.Printf( wxT( "DXF Plotter exception: %s"), GetChars( e.What() ) );
92  reporter.Report( msg, REPORTER::RPT_ERROR );
93  schframe->SetCurrentSheet( oldsheetpath );
95  schframe->SetSheetNumberAndCount();
96  return;
97  }
98  }
99 
100  schframe->SetCurrentSheet( oldsheetpath );
102  schframe->SetSheetNumberAndCount();
103 }
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
Class SCH_SHEET_LIST.
Schematic editor (Eeschema) main window.
SCH_SCREEN * LastScreen() const
Function LastScreen.
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
static wxString GetDefaultFileExtension()
Definition: plotter.h:1246
SCH_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:55
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)
Class SCH_SHEET_PATH.
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
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:92
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
wxString GetUniqueFilenameForCurrentSheet()
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
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:47
void DIALOG_PLOT_SCHEMATIC::createHPGLFile ( bool  aPlotAll,
bool  aPlotFrameRef 
)
private

Definition at line 110 of file plot_schematic_HPGL.cpp.

References SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), g_RootSheet, GetChars(), 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_HPGLPaperSizeOption, DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox, DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_parent, PAGE_DEFAULT, Plot_1_Page_HPGL(), plot_sheet_list(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::RPT_ACTION, REPORTER::RPT_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(), and SetPlotOriginCenter().

111 {
112  SCH_SCREEN* screen = m_parent->GetScreen();
113  SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet();
114 
115  /* When printing all pages, the printed page is not the current page.
116  * In complex hierarchies, we must setup references and other parameters
117  * in the printed SCH_SCREEN
118  * because in complex hierarchies a SCH_SCREEN (a schematic drawings)
119  * is shared between many sheets
120  */
121  SCH_SHEET_LIST sheetList;
122 
123  if( aPlotAll )
124  sheetList.BuildSheetList( g_RootSheet );
125  else
126  sheetList.push_back( m_parent->GetCurrentSheet() );
127 
128  REPORTER& reporter = m_MessagesBox->Reporter();
129 
130  SetHPGLPenWidth();
131 
132  for( unsigned i = 0; i < sheetList.size(); i++ )
133  {
134  m_parent->SetCurrentSheet( sheetList[i] );
137 
138  screen = m_parent->GetCurrentSheet().LastScreen();
139 
140  if( !screen ) // LastScreen() may return NULL
141  screen = m_parent->GetScreen();
142 
143  const PAGE_INFO& curPage = screen->GetPageSettings();
144 
145  PAGE_INFO plotPage = curPage;
146 
147  // if plotting on a page size other than curPage
148  if( m_HPGLPaperSizeOption->GetSelection() != PAGE_DEFAULT )
149  plotPage.SetType( plot_sheet_list( m_HPGLPaperSizeOption->GetSelection() ) );
150 
151  // Calculation of conversion scales.
152  double plot_scale = (double) plotPage.GetWidthMils() / curPage.GetWidthMils();
153 
154  // Calculate offsets
155  wxPoint plotOffset;
156  wxString msg;
157 
158  if( GetPlotOriginCenter() )
159  {
160  plotOffset.x = plotPage.GetWidthIU() / 2;
161  plotOffset.y = -plotPage.GetHeightIU() / 2;
162  }
163 
164  try
165  {
166  wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
167  wxString ext = HPGL_PLOTTER::GetDefaultFileExtension();
168  wxFileName plotFileName = createPlotFileName( m_outputDirectoryName, fname,
169  ext, &reporter );
170 
171  LOCALE_IO toggle;
172 
173  if( Plot_1_Page_HPGL( plotFileName.GetFullPath(), screen, plotPage, plotOffset,
174  plot_scale, aPlotFrameRef ) )
175  {
176  msg.Printf( _( "Plot: \"%s\" OK.\n" ), GetChars( plotFileName.GetFullPath() ) );
177  reporter.Report( msg, REPORTER::RPT_ACTION );
178  }
179  else
180  {
181  msg.Printf( _( "Unable to create file \"%s\".\n" ),
182  GetChars( plotFileName.GetFullPath() ) );
183  reporter.Report( msg, REPORTER::RPT_ERROR );
184  }
185  }
186  catch( IO_ERROR& e )
187  {
188  msg.Printf( wxT( "HPGL Plotter exception: %s"), GetChars( e.What() ) );
189  reporter.Report( msg, REPORTER::RPT_ERROR );
190  }
191 
192  }
193 
194  m_parent->SetCurrentSheet( oldsheetpath );
197 }
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
Class SCH_SHEET_LIST.
Class LOCALE_IO is a class that can be instantiated within a scope in which you are expecting excepti...
Definition: common.h:166
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
SCH_SCREEN * LastScreen() const
Function LastScreen.
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
SCH_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:55
static const wxChar * plot_sheet_list(int aSize)
wxFileName createPlotFileName(wxTextCtrl *aOutputDirectoryName, wxString &aPlotFileName, wxString &aExtension, REPORTER *aReporter=NULL)
Create a file name with an absolute path name.
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:49
REPORTER & Reporter()
returns the reporter object that reports to this panel
SCH_SHEET_PATH & GetCurrentSheet()
Class SCH_SHEET_PATH.
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
int GetWidthMils() const
Definition: page_info.h:132
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
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:92
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
static wxString GetDefaultFileExtension()
Definition: plotter.h:585
wxString GetUniqueFilenameForCurrentSheet()
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:115
bool Plot_1_Page_HPGL(const wxString &aFileName, SCH_SCREEN *aScreen, const PAGE_INFO &aPageInfo, wxPoint aPlot0ffset, double aScale, bool aPlotFrameRef)
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:47
void DIALOG_PLOT_SCHEMATIC::createPDFFile ( bool  aPlotAll,
bool  aPlotFrameRef 
)
private

Definition at line 40 of file plot_schematic_PDF.cpp.

References SCH_SHEET_LIST::BuildSheetList(), PDF_PLOTTER::ClosePage(), createPlotFileName(), g_RootSheet, GetChars(), 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_MessagesBox, DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_parent, PDF_PLOTTER::OpenFile(), plotOneSheetPDF(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), restoreEnvironment(), REPORTER::RPT_ACTION, REPORTER::RPT_ERROR, PLOTTER::SetColorMode(), 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(), and setPlotFrameRef().

41 {
42  SCH_SCREEN* screen = m_parent->GetScreen();
43  SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet(); // sheetpath is saved here
44 
45  /* When printing all pages, the printed page is not the current page. In
46  * complex hierarchies, we must update component references and others
47  * parameters in the given printed SCH_SCREEN, accordint to the sheet path
48  * because in complex hierarchies a SCH_SCREEN (a drawing ) is shared
49  * between many sheets and component references depend on the actual sheet
50  * path used
51  */
52  SCH_SHEET_LIST sheetList;
53 
54  if( aPlotAll )
55  sheetList.BuildSheetList( g_RootSheet );
56  else
57  sheetList.push_back( m_parent->GetCurrentSheet() );
58 
59  // Allocate the plotter and set the job level parameter
60  PDF_PLOTTER* plotter = new PDF_PLOTTER();
62  plotter->SetColorMode( getModeColor() );
63  plotter->SetCreator( wxT( "Eeschema-PDF" ) );
64  plotter->SetTitle( m_parent->GetTitleBlock().GetTitle() );
65 
66  wxString msg;
67  wxFileName plotFileName;
68  REPORTER& reporter = m_MessagesBox->Reporter();
69  LOCALE_IO toggle; // Switch the locale to standard C
70 
71  for( unsigned i = 0; i < sheetList.size(); i++ )
72  {
73  m_parent->SetCurrentSheet( sheetList[i] );
76  screen = m_parent->GetCurrentSheet().LastScreen();
77 
78  if( i == 0 )
79  {
80 
81  try
82  {
83  wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
84  wxString ext = PDF_PLOTTER::GetDefaultFileExtension();
86  fname, ext, &reporter );
87 
88  if( !plotter->OpenFile( plotFileName.GetFullPath() ) )
89  {
90  msg.Printf( _( "Unable to create file \"%s\".\n" ),
91  GetChars( plotFileName.GetFullPath() ) );
92  reporter.Report( msg, REPORTER::RPT_ERROR );
93  delete plotter;
94  return;
95  }
96 
97  // Open the plotter and do the first page
98  setupPlotPagePDF( plotter, screen );
99  plotter->StartPlot();
100  }
101  catch( const IO_ERROR& e )
102  {
103  // Cannot plot PDF file
104  msg.Printf( wxT( "PDF Plotter exception: %s" ), GetChars( e.What() ) );
105  reporter.Report( msg, REPORTER::RPT_ERROR );
106 
107  restoreEnvironment( plotter, oldsheetpath );
108  return;
109  }
110 
111  }
112  else
113  {
114  /* For the following pages you need to close the (finished) page,
115  * reconfigure, and then start a new one */
116  plotter->ClosePage();
117  setupPlotPagePDF( plotter, screen );
118  plotter->StartPage();
119  }
120 
121  plotOneSheetPDF( plotter, screen, aPlotFrameRef );
122  }
123 
124  // Everything done, close the plot and restore the environment
125  msg.Printf( _( "Plot: \"%s\" OK.\n" ), GetChars( plotFileName.GetFullPath() ) );
126  reporter.Report( msg, REPORTER::RPT_ACTION );
127 
128  restoreEnvironment( plotter, oldsheetpath );
129 }
static wxString GetDefaultFileExtension()
Definition: plotter.h:826
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
Class SCH_SHEET_LIST.
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:160
Class LOCALE_IO is a class that can be instantiated within a scope in which you are expecting excepti...
Definition: common.h:166
virtual void StartPage()
Starts a new page in the PDF document.
virtual void SetTitle(const wxString &aTitle)
Definition: plotter.h:165
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i...
SCH_SCREEN * LastScreen() const
Function LastScreen.
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
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
Function GetScreen returns 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)
const wxString & GetTitle() const
Definition: title_block.h:64
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:55
virtual void SetDefaultLineWidth(int width) override
Set the default line width.
Definition: PS_plotter.cpp:52
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()
Class SCH_SHEET_PATH.
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
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:92
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
const TITLE_BLOCK & GetTitleBlock() const override
wxString GetUniqueFilenameForCurrentSheet()
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
virtual bool OpenFile(const wxString &aFullFilename) override
Open or create the plot file aFullFilename.
Definition: PDF_plotter.cpp:49
WX_HTML_REPORT_PANEL * m_MessagesBox
virtual bool StartPlot() override
The PDF engine supports multiple pages; the first one is opened &#39;for free&#39; 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:47
virtual void SetColorMode(bool _color_mode)
Definition: plotter.h:125
void plotOneSheetPDF(PLOTTER *aPlotter, SCH_SCREEN *aScreen, bool aPlotFrameRef)
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 diretory name to plot, this can be a relative name of the current project diretory 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 336 of file dialog_plot_schematic.cpp.

References PROJECT::AbsolutePath(), EnsureFileDirectoryExists(), GetChars(), KIWAY_HOLDER::Prj(), REPORTER::Report(), and REPORTER::RPT_ERROR.

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

340 {
341  wxString outputDirName = aOutputDirectoryName->GetValue();
342  wxFileName outputDir = wxFileName::DirName( outputDirName );
343 
344  wxString plotFileName = Prj().AbsolutePath( aPlotFileName + wxT( "." ) + aExtension);
345 
346  if( !EnsureFileDirectoryExists( &outputDir, plotFileName, aReporter ) )
347  {
348  wxString msg;
349  msg.Printf( _( "Could not write plot files to folder \"%s\"." ),
350  GetChars( outputDir.GetPath() ) );
351  aReporter->Report( msg, REPORTER::RPT_ERROR );
352  }
353 
354  wxFileName fn( plotFileName );
355  fn.SetPath( outputDir.GetFullPath() );
356  return fn;
357 }
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
bool EnsureFileDirectoryExists(wxFileName *aTargetFullFileName, const wxString &aBaseFilename, REPORTER *aReporter)
Helper function EnsureFileDirectoryExists make aTargetFullFileName absolute and creates the path of t...
Definition: common.cpp:267
VTBL_ENTRY const wxString AbsolutePath(const wxString &aFileName) const
Function AbsolutePath fixes up aFileName if it is relative to the project&#39;s directory to be an absolu...
Definition: project.cpp:380
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:92
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
void DIALOG_PLOT_SCHEMATIC::createPSFile ( bool  aPlotAll,
bool  aPlotFrameRef 
)
private

Definition at line 38 of file plot_schematic_PS.cpp.

References SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), g_RootSheet, GetChars(), 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, min, PAGE_SIZE_A, PAGE_SIZE_A4, PAGE_SIZE_AUTO, plotOneSheetPS(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::RPT_ACTION, REPORTER::RPT_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(), and SetPlotOriginCenter().

39 {
40  SCH_SCREEN* screen = m_parent->GetScreen();
41  SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet(); // sheetpath is saved here
42  PAGE_INFO actualPage; // page size selected in schematic
43  PAGE_INFO plotPage; // page size selected to plot
44 
45  /* When printing all pages, the printed page is not the current page.
46  * In complex hierarchies, we must update component references
47  * and others parameters in the given printed SCH_SCREEN, accordint to the sheet path
48  * because in complex hierarchies a SCH_SCREEN (a drawing )
49  * is shared between many sheets and component references depend on the actual sheet path used
50  */
51  SCH_SHEET_LIST sheetList;
52 
53  if( aPlotAll )
54  sheetList.BuildSheetList( g_RootSheet );
55  else
56  sheetList.push_back( m_parent->GetCurrentSheet() );
57 
58  for( unsigned i = 0; i < sheetList.size(); i++ )
59  {
60  m_parent->SetCurrentSheet( sheetList[i] );
63  screen = m_parent->GetCurrentSheet().LastScreen();
64  actualPage = screen->GetPageSettings();
65 
66  switch( m_pageSizeSelect )
67  {
68  case PAGE_SIZE_A:
69  plotPage.SetType( wxT( "A" ) );
70  plotPage.SetPortrait( actualPage.IsPortrait() );
71  break;
72 
73  case PAGE_SIZE_A4:
74  plotPage.SetType( wxT( "A4" ) );
75  plotPage.SetPortrait( actualPage.IsPortrait() );
76  break;
77 
78  case PAGE_SIZE_AUTO:
79  default:
80  plotPage = actualPage;
81  break;
82  }
83 
84  double scalex = (double) plotPage.GetWidthMils() / actualPage.GetWidthMils();
85  double scaley = (double) plotPage.GetHeightMils() / actualPage.GetHeightMils();
86 
87  double scale = std::min( scalex, scaley );
88 
89  wxPoint plot_offset;
90 
91  wxString outputDirName = m_outputDirectoryName->GetValue();
92 
93  wxString msg;
94  REPORTER& reporter = m_MessagesBox->Reporter();
95 
96  try
97  {
98  wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
99  wxString ext = PS_PLOTTER::GetDefaultFileExtension();
100  wxFileName plotFileName = createPlotFileName( m_outputDirectoryName,
101  fname, ext, &reporter );
102 
103  if( plotOneSheetPS( plotFileName.GetFullPath(), screen, plotPage, plot_offset,
104  scale, aPlotFrameRef ) )
105  {
106  msg.Printf( _( "Plot: \"%s\" OK.\n" ), GetChars( plotFileName.GetFullPath() ) );
107  reporter.Report( msg, REPORTER::RPT_ACTION );
108  }
109  else
110  {
111  // Error
112  msg.Printf( _( "Unable to create file \"%s\".\n" ),
113  GetChars( plotFileName.GetFullPath() ) );
114  reporter.Report( msg, REPORTER::RPT_ERROR );
115  }
116 
117  }
118  catch( IO_ERROR& e )
119  {
120  msg.Printf( wxT( "PS Plotter exception: %s"), GetChars( e.What() ) );
121  reporter.Report( msg, REPORTER::RPT_ERROR );
122  }
123  }
124 
125  m_parent->SetCurrentSheet( oldsheetpath );
128 }
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
Class SCH_SHEET_LIST.
static wxString GetDefaultFileExtension()
Definition: plotter.h:763
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
SCH_SCREEN * LastScreen() const
Function LastScreen.
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
SCH_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
bool IsPortrait() const
Definition: page_info.h:116
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:55
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.
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:49
REPORTER & Reporter()
returns the reporter object that reports to this panel
SCH_SHEET_PATH & GetCurrentSheet()
Class SCH_SHEET_PATH.
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
int GetWidthMils() const
Definition: page_info.h:132
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
const int scale
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:92
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
wxString GetUniqueFilenameForCurrentSheet()
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:115
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:47
int GetHeightMils() const
Definition: page_info.h:135
#define min(a, b)
Definition: auxiliary.h:85
void DIALOG_PLOT_SCHEMATIC::createSVGFile ( bool  aPlotAll,
bool  aPlotFrameRef 
)
private

Definition at line 43 of file plot_schematic_SVG.cpp.

References SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), g_RootSheet, GetChars(), SCH_EDIT_FRAME::GetCurrentSheet(), SVG_PLOTTER::GetDefaultFileExtension(), getModeColor(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), SCH_SHEET_PATH::LastScreen(), DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox, DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_parent, plotOneSheetSVG(), REPORTER::Report(), WX_HTML_REPORT_PANEL::Reporter(), REPORTER::RPT_ACTION, REPORTER::RPT_ERROR, SCH_EDIT_FRAME::SetCurrentSheet(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), SCH_SHEET_PATH::UpdateAllScreenReferences(), and IO_ERROR::What().

Referenced by PlotSchematic(), and SetPlotOriginCenter().

44 {
45  wxString msg;
46  REPORTER& reporter = m_MessagesBox->Reporter();
47  SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet();
48  SCH_SHEET_LIST sheetList;
49 
50  if( aPrintAll )
51  sheetList.BuildSheetList( g_RootSheet );
52  else
53  sheetList.push_back( m_parent->GetCurrentSheet() );
54 
55  for( unsigned i = 0; i < sheetList.size(); i++ )
56  {
57  SCH_SCREEN* screen;
58  m_parent->SetCurrentSheet( sheetList[i] );
61  screen = m_parent->GetCurrentSheet().LastScreen();
62 
63  try
64  {
65  wxString fname = m_parent->GetUniqueFilenameForCurrentSheet();
66  wxString ext = SVG_PLOTTER::GetDefaultFileExtension();
67  wxFileName plotFileName = createPlotFileName( m_outputDirectoryName,
68  fname, ext, &reporter );
69 
70  bool success = plotOneSheetSVG( m_parent, plotFileName.GetFullPath(), screen,
71  getModeColor() ? false : true,
72  aPrintFrameRef );
73 
74  if( !success )
75  {
76  msg.Printf( _( "Cannot create file \"%s\".\n" ),
77  GetChars( plotFileName.GetFullPath() ) );
78  reporter.Report( msg, REPORTER::RPT_ERROR );
79  }
80  else
81  {
82  msg.Printf( _( "Plot: \"%s\" OK.\n" ),
83  GetChars( plotFileName.GetFullPath() ) );
84  reporter.Report( msg, REPORTER::RPT_ACTION );
85  }
86  }
87  catch( const IO_ERROR& e )
88  {
89  // Cannot plot SVG file
90  msg.Printf( wxT( "SVG Plotter exception: %s" ), GetChars( e.What() ) );
91  reporter.Report( msg, REPORTER::RPT_ERROR );
92  break;
93  }
94  }
95 
96  m_parent->SetCurrentSheet( oldsheetpath );
99 }
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
Class SCH_SHEET_LIST.
static wxString GetDefaultFileExtension()
Definition: plotter.h:905
SCH_SCREEN * LastScreen() const
Function LastScreen.
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:55
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()
Class SCH_SHEET_PATH.
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
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:92
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
wxString GetUniqueFilenameForCurrentSheet()
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
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:47
static bool plotOneSheetSVG(EDA_DRAW_FRAME *aFrame, const wxString &aFileName, SCH_SCREEN *aScreen, bool aPlotBlackAndWhite, bool aPlotFrameRef)
bool DIALOG_SHIM::Enable ( bool  enable)
overrideinherited

Definition at line 199 of file dialog_shim.cpp.

Referenced by DIALOG_PRINT_USING_PRINTER::InitValues(), and DIALOG_SHIM::IsQuasiModal().

200 {
201  // so we can do logging of this state change:
202 
203 #if defined(DEBUG)
204  const char* type_id = typeid( *this ).name();
205  printf( "wxDialog %s: %s\n", type_id, enable ? "enabled" : "disabled" );
206 #endif
207 
208  return wxDialog::Enable( enable );
209 }
void DIALOG_SHIM::EndQuasiModal ( int  retCode)
inherited

Definition at line 604 of file dialog_shim.cpp.

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

Referenced by DIALOG_SHIM::OnButton(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnCancelButtonClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCancelButtonClick(), DIALOG_EDIT_ONE_FIELD::OnCancelClick(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnCloseDialog(), DIALOG_EDIT_ONE_FIELD::OnCloseDialog(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnCloseDialog(), DIALOG_CHOOSE_COMPONENT::OnCloseTimer(), DIALOG_SHIM::OnCloseWindow(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick(), DIALOG_EDIT_ONE_FIELD::OnOkClick(), DIALOG_EXCHANGE_FOOTPRINTS::OnQuit(), DIALOG_CHOOSE_COMPONENT::OnSchViewDClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::SetInitCmp(), and DIALOG_SHIM::~DIALOG_SHIM().

605 {
606  // Hook up validator and transfer data from controls handling so quasi-modal dialogs
607  // handle validation in the same way as other dialogs.
608  if( ( retCode == wxID_OK ) && ( !Validate() || !TransferDataFromWindow() ) )
609  return;
610 
611  SetReturnCode( retCode );
612 
613  if( !IsQuasiModal() )
614  {
615  wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal wasn't called" ) );
616  return;
617  }
618 
619  m_qmodal_showing = false;
620 
621  if( m_qmodal_loop )
622  {
623  if( m_qmodal_loop->IsRunning() )
624  m_qmodal_loop->Exit( 0 );
625  else
626  m_qmodal_loop->ScheduleExit( 0 );
627 
628  m_qmodal_loop = NULL;
629  }
630 
633 
634  Show( false );
635 }
bool m_qmodal_showing
Definition: dialog_shim.h:155
EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:154
bool IsQuasiModal()
Definition: dialog_shim.h:103
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:156
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 104 of file dialog_shim.cpp.

References PCAD2KICAD::Center.

Referenced by COLOR4D_PICKER_DLG::COLOR4D_PICKER_DLG(), DIALOG_3D_VIEW_OPTIONS::DIALOG_3D_VIEW_OPTIONS(), DIALOG_ANNOTATE::DIALOG_ANNOTATE(), DIALOG_BOM::DIALOG_BOM(), DIALOG_COPPER_ZONE::DIALOG_COPPER_ZONE(), DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES(), DIALOG_DIMENSION_EDITOR::DIALOG_DIMENSION_EDITOR(), DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS(), DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY(), DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE(), DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS(), DIALOG_ENUM_PADS::DIALOG_ENUM_PADS(), 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_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST(), DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG(), 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_TEXT::DIALOG_LIB_EDIT_TEXT(), DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT(), DIALOG_LIBEDIT_OPTIONS::DIALOG_LIBEDIT_OPTIONS(), DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES(), DIALOG_PADS_MASK_CLEARANCE::DIALOG_PADS_MASK_CLEARANCE(), DIALOG_PLOT_SCHEMATIC(), DIALOG_SCH_EDIT_SHEET_PIN::DIALOG_SCH_EDIT_SHEET_PIN(), DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS(), DIALOG_SELECT_PRETTY_LIB::DIALOG_SELECT_PRETTY_LIB(), DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE(), DIALOG_EDIT_ONE_FIELD::init(), DIALOG_SHIM::IsQuasiModal(), NETLIST_DIALOG::NETLIST_DIALOG(), DIALOG_LIB_EDIT_PIN::OnInitDialog(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnInitDialog(), DIALOG_TRACK_VIA_PROPERTIES::OnInitDlg(), DIALOG_GRAPHIC_ITEMS_OPTIONS::OnInitDlg(), DIALOG_EDIT_FPTEXT::OnInitDlg(), DIALOG_SET_GRID::OnInitDlg(), DIALOG_PCB_TEXT_PROPERTIES::OnInitDlg(), DIALOG_PRINT_FOR_MODEDIT::OnInitDlg(), DIALOG_FOOTPRINT_FP_EDITOR::OnInitDlg(), DIALOG_GRAPHIC_ITEM_PROPERTIES::OnInitDlg(), DIALOG_SIM_SETTINGS::onInitDlg(), DIALOG_SPICE_MODEL::onInitDlg(), DIALOG_FOOTPRINT_BOARD_EDITOR::OnInitDlg(), DIALOG_PRINT_USING_PRINTER::OnInitDlg(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnInitDlg(), TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR(), DIALOG_SIGNAL_LIST::TransferDataToWindow(), and DIALOG_UPDATE_FIELDS::TransferDataToWindow().

105 {
106  // must be called from the constructor of derived classes,
107  // when all widgets are initialized, and therefore their size fixed
108 
109  // SetSizeHints fixes the minimal size of sizers in the dialog
110  // (SetSizeHints calls Fit(), so no need to call it)
111  GetSizer()->SetSizeHints( this );
112 
113  // the default position, when calling the first time the dlg
114  Center();
115 }
bool DIALOG_PLOT_SCHEMATIC::getModeColor ( )
inlineprivate
PlotFormat DIALOG_PLOT_SCHEMATIC::GetPlotFileFormat ( )
private

Definition at line 200 of file dialog_plot_schematic.cpp.

References DIALOG_PLOT_SCHEMATIC_BASE::m_plotFormatOpt, PLOT_FORMAT_DXF, PLOT_FORMAT_HPGL, PLOT_FORMAT_PDF, PLOT_FORMAT_POST, and PLOT_FORMAT_SVG.

Referenced by getPlotOptions(), OnPlotFormatSelection(), PlotSchematic(), and setModeColor().

201 {
202  switch( m_plotFormatOpt->GetSelection() )
203  {
204  default:
205  case 0: return PLOT_FORMAT_POST;
206  case 1: return PLOT_FORMAT_PDF;
207  case 2: return PLOT_FORMAT_SVG;
208  case 3: return PLOT_FORMAT_DXF;
209  case 4: return PLOT_FORMAT_HPGL;
210  }
211 }
bool DIALOG_PLOT_SCHEMATIC::getPlotFrameRef ( )
inlineprivate
void DIALOG_PLOT_SCHEMATIC::getPlotOptions ( )
private

Definition at line 220 of file dialog_plot_schematic.cpp.

References getModeColor(), SCH_EDIT_FRAME::GetPlotDirectoryName(), GetPlotFileFormat(), getPlotFrameRef(), GetPlotOriginCenter(), m_config, m_configChanged, DIALOG_PLOT_SCHEMATIC_BASE::m_DefaultLineSizeCtrl, DIALOG_PLOT_SCHEMATIC_BASE::m_HPGLPaperSizeOption, m_HPGLPaperSizeSelect, m_HPGLPenSize, DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_pageSizeSelect, DIALOG_PLOT_SCHEMATIC_BASE::m_PaperSizeOption, m_parent, PLOT_FORMAT_KEY, PLOT_FRAME_REFERENCE_KEY, PLOT_HPGL_ORIGIN_KEY, PLOT_HPGL_PAPERSIZE_KEY, PLOT_HPGL_PEN_SIZE_KEY, PLOT_MODECOLOR_KEY, SetDefaultLineThickness(), SCH_EDIT_FRAME::SetPlotDirectoryName(), and ValueFromTextCtrl().

Referenced by PlotSchematic(), and PrjConfigChanged().

221 {
224  m_config->Write( PLOT_FORMAT_KEY, (long) GetPlotFileFormat() );
228 
229  // HPGL Pen Size is stored in mm in config
230  m_config->Write( PLOT_HPGL_PEN_SIZE_KEY, m_HPGLPenSize/IU_PER_MM );
231 
232  m_pageSizeSelect = m_PaperSizeOption->GetSelection();
234 
235  // Plot directory
236  wxString path = m_outputDirectoryName->GetValue();
237  path.Replace( '\\', '/' );
238 
239  if( m_parent->GetPlotDirectoryName() != path )
240  m_configChanged = true;
241 
243 }
void SetPlotDirectoryName(const wxString &aDirName)
#define PLOT_HPGL_ORIGIN_KEY
void SetDefaultLineThickness(int aThickness)
#define PLOT_MODECOLOR_KEY
const wxString & GetPlotDirectoryName() const
accessor to the destination directory to use when generating plot files.
#define PLOT_FRAME_REFERENCE_KEY
int ValueFromTextCtrl(const wxTextCtrl &aTextCtr)
Convert the number Value in a string according to the internal units and the selected unit (g_UserUni...
Definition: base_units.cpp:385
#define PLOT_HPGL_PEN_SIZE_KEY
#define PLOT_HPGL_PAPERSIZE_KEY
#define PLOT_FORMAT_KEY
bool DIALOG_PLOT_SCHEMATIC::GetPlotOriginCenter ( )
inlineprivate

Definition at line 112 of file dialog_plot_schematic.h.

References DIALOG_PLOT_SCHEMATIC_BASE::m_plotOriginOpt.

Referenced by createHPGLFile(), and getPlotOptions().

113  {
114  return m_plotOriginOpt->GetSelection() == 1;
115  }
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 125 of file dialog_shim.cpp.

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

126 {
127  wxSize sz( x, 0 );
128  return ConvertDialogToPixels( sz ).x;
129 }
void DIALOG_PLOT_SCHEMATIC::initDlg ( )
private

Definition at line 81 of file dialog_plot_schematic.cpp.

References AddUnitSymbol(), g_UserUnit, GetDefaultLineThickness(), SCH_EDIT_FRAME::GetPlotDirectoryName(), KiBitmap(), DIALOG_PLOT_SCHEMATIC_BASE::m_browseButton, m_config, DIALOG_PLOT_SCHEMATIC_BASE::m_DefaultLineSizeCtrl, DIALOG_PLOT_SCHEMATIC_BASE::m_defaultLineWidthTitle, DIALOG_PLOT_SCHEMATIC_BASE::m_HPGLPaperSizeOption, m_HPGLPaperSizeSelect, m_HPGLPenSize, DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName, m_pageSizeSelect, DIALOG_PLOT_SCHEMATIC_BASE::m_PaperSizeOption, m_parent, DIALOG_PLOT_SCHEMATIC_BASE::m_penHPGLWidthCtrl, DIALOG_PLOT_SCHEMATIC_BASE::m_penHPLGWidthTitle, DIALOG_PLOT_SCHEMATIC_BASE::m_plotFormatOpt, OnPlotFormatSelection(), PLOT_FORMAT_DXF, PLOT_FORMAT_HPGL, PLOT_FORMAT_KEY, PLOT_FORMAT_PDF, PLOT_FORMAT_POST, PLOT_FORMAT_SVG, PLOT_FRAME_REFERENCE_KEY, PLOT_HPGL_ORIGIN_KEY, PLOT_HPGL_PAPERSIZE_KEY, PLOT_HPGL_PEN_SIZE_KEY, PLOT_MODECOLOR_KEY, PutValueInLocalUnits(), setModeColor(), setPlotFrameRef(), and SetPlotOriginCenter().

Referenced by DIALOG_PLOT_SCHEMATIC(), and PrjConfigChanged().

82 {
83  m_browseButton->SetBitmap( KiBitmap( browse_files_xpm ) );
84 
85  // Set paper size option
86  m_PaperSizeOption->SetSelection( m_pageSizeSelect );
87 
88  // Set color or B&W plot option
89  bool tmp;
90  m_config->Read( PLOT_MODECOLOR_KEY, &tmp, true );
91  setModeColor( tmp );
92 
93  // Set plot or not frame reference option
94  m_config->Read( PLOT_FRAME_REFERENCE_KEY, &tmp, true );
95  setPlotFrameRef( tmp );
96 
97  // Set HPGL plot origin to center of paper of left bottom corner
98  m_config->Read( PLOT_HPGL_ORIGIN_KEY, &tmp, false );
99  SetPlotOriginCenter( tmp );
100 
103 
104  // HPGL Pen Size is stored in mm in config
106  m_HPGLPenSize *= IU_PER_MM;
107 
108  // Switch to the last save plot format
109  long plotfmt;
110  m_config->Read( PLOT_FORMAT_KEY, &plotfmt, 0 );
111 
112  switch( plotfmt )
113  {
114  default:
115  case PLOT_FORMAT_POST:
116  m_plotFormatOpt->SetSelection( 0 );
117  break;
118 
119  case PLOT_FORMAT_PDF:
120  m_plotFormatOpt->SetSelection( 1 );
121  break;
122 
123  case PLOT_FORMAT_SVG:
124  m_plotFormatOpt->SetSelection( 2 );
125  break;
126 
127  case PLOT_FORMAT_DXF:
128  m_plotFormatOpt->SetSelection( 3 );
129  break;
130 
131  case PLOT_FORMAT_HPGL:
132  m_plotFormatOpt->SetSelection( 4 );
133  break;
134  }
135 
136  // Set the default line width (pen width which should be used for
137  // items that do not have a pen size defined (like frame ref)
140 
141  // 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 
153  // Hide/show widgets that are not always displayed:
154  wxCommandEvent cmd_event;
155  OnPlotFormatSelection( cmd_event );
156 }
void SetPlotOriginCenter(bool aCenter)
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i...
void OnPlotFormatSelection(wxCommandEvent &event) override
#define PLOT_HPGL_ORIGIN_KEY
#define PLOT_MODECOLOR_KEY
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:78
const wxString & GetPlotDirectoryName() const
accessor to the destination directory to use when generating plot files.
void setPlotFrameRef(bool aPlot)
#define PLOT_FRAME_REFERENCE_KEY
#define PLOT_HPGL_PEN_SIZE_KEY
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
void PutValueInLocalUnits(wxTextCtrl &aTextCtr, int aValue)
Function PutValueInLocalUnits converts aValue from internal units to user units and append the units ...
Definition: base_units.cpp:266
void AddUnitSymbol(wxStaticText &Stext, EDA_UNITS_T aUnit)
Definition: base_units.cpp:514
#define PLOT_HPGL_PAPERSIZE_KEY
#define PLOT_FORMAT_KEY
void setModeColor(bool aColor)
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 60 of file kiway_player.h.

References KIWAY_HOLDER::m_kiway, KIWAY_HOLDER::Prj(), and KIWAY_HOLDER::SetKiway().

Referenced by SCH_EDIT_FRAME::AppendSchematic(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_CHOOSE_COMPONENT::ConstructRightPanel(), CVPCB_MAINFRAME::CreateScreenCmp(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), DIALOG_SHIM::DIALOG_SHIM(), EDIT_TOOL::editFootprintInFpEditor(), SCH_EDIT_FRAME::EditSheet(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), LIB_MANAGER::GetBufferedPart(), FOOTPRINT_EDIT_FRAME::GetIconScale(), LIB_MANAGER::getLibraryBuffer(), FOOTPRINT_EDIT_FRAME::GetPlotSettings(), SCH_EDIT_FRAME::ImportFile(), PCB_EDIT_FRAME::ImportFile(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers(), KIWAY_PLAYER::language_change(), CVPCB_MAINFRAME::LoadFootprintFiles(), KIWAY_PLAYER::OnChangeIconsOptions(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), SCH_BASE_FRAME::OnEditSymbolLibTable(), KICAD_MANAGER_FRAME::OnImportEagleFiles(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), SCH_EDIT_FRAME::OnLeftClick(), SCH_BASE_FRAME::OnOpenLibraryViewer(), SCH_EDIT_FRAME::OnSimulate(), DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick(), FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard(), FOOTPRINT_EDIT_FRAME::OnUpdateReplaceModuleInBoard(), SCH_EDIT_FRAME::OpenProjectFiles(), KIWAY_HOLDER::Prj(), PCB_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Special_Functions(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), FOOTPRINT_WIZARD_FRAME::ReCreateVToolbar(), LIB_EDIT_FRAME::refreshSchematic(), SCH_EDIT_FRAME::SaveEEFile(), CVPCB_MAINFRAME::SaveFootprintAssociation(), SCH_BASE_FRAME::SelectComponentFromLibBrowser(), SCH_EDIT_FRAME::SendCrossProbeNetName(), PCB_EDIT_FRAME::SendCrossProbeNetName(), CVPCB_MAINFRAME::SendMessageToEESCHEMA(), PCB_EDIT_FRAME::SendMessageToEESCHEMA(), SCH_EDIT_FRAME::SendMessageToPCBNEW(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_EDIT_FRAME::SetPlotSettings(), DISPLAY_FOOTPRINTS_FRAME::Show3D_Frame(), FOOTPRINT_VIEWER_FRAME::Show3D_Frame(), FOOTPRINT_EDIT_FRAME::Show3D_Frame(), FOOTPRINT_WIZARD_FRAME::Show3D_Frame(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::showButtonHandler(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::UpdatePart(), and DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint().

61  {
62  wxASSERT( m_kiway ); // smoke out bugs in Debug build, then Release runs fine.
63  return *m_kiway;
64  }
KIWAY * m_kiway
Definition: kiway_player.h:85
void DIALOG_PLOT_SCHEMATIC::OnButtonCancelClick ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_SCHEMATIC_BASE.

Definition at line 214 of file dialog_plot_schematic.cpp.

Referenced by PrjConfigChanged().

215 {
216  EndModal( wxID_CANCEL );
217 }
void DIALOG_PLOT_SCHEMATIC::OnButtonPlotAllClick ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_SCHEMATIC_BASE.

Definition at line 298 of file dialog_plot_schematic.cpp.

References PlotSchematic().

Referenced by PrjConfigChanged().

299 {
300  PlotSchematic( true );
301 }
void PlotSchematic(bool aPlotAll)
void DIALOG_PLOT_SCHEMATIC::OnButtonPlotCurrentClick ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_SCHEMATIC_BASE.

Definition at line 292 of file dialog_plot_schematic.cpp.

References PlotSchematic().

Referenced by PrjConfigChanged().

293 {
294  PlotSchematic( false );
295 }
void PlotSchematic(bool aPlotAll)
virtual void DIALOG_PLOT_SCHEMATIC_BASE::OnCloseWindow ( wxCloseEvent &  event)
inlineprotectedvirtualinherited
virtual void DIALOG_PLOT_SCHEMATIC_BASE::OnHPGLPageSelected ( wxCommandEvent &  event)
inlineprotectedvirtualinherited
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 163 of file dialog_plot_schematic.cpp.

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

Referenced by setModeColor().

164 {
165  // Build the absolute path of current output plot directory
166  // to preselect it when opening the dialog.
167  wxFileName fn( m_outputDirectoryName->GetValue() );
168  wxString path = Prj().AbsolutePath( m_outputDirectoryName->GetValue() );
169 
170  wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );
171 
172  if( dirDialog.ShowModal() == wxID_CANCEL )
173  {
174  return;
175  }
176 
177  wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
178 
180  wxString defaultPath = fn.GetPathWithSep();
181  wxString msg;
182  msg.Printf( _( "Do you want to use a path relative to\n\"%s\"" ),
183  GetChars( defaultPath ) );
184 
185  wxMessageDialog dialog( this, msg, _( "Plot Output Directory" ),
186  wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
187 
188  // relative directory selected
189  if( dialog.ShowModal() == wxID_YES )
190  {
191  if( !dirName.MakeRelativeTo( defaultPath ) )
192  wxMessageBox( _( "Cannot make path relative (target volume different from file "
193  "volume)!" ), _( "Plot Output Directory" ), wxOK | wxICON_ERROR );
194  }
195 
196  m_outputDirectoryName->SetValue( dirName.GetFullPath() );
197 }
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:55
VTBL_ENTRY const wxString AbsolutePath(const wxString &aFileName) const
Function AbsolutePath fixes up aFileName if it is relative to the project&#39;s directory to be an absolu...
Definition: project.cpp:380
wxString GetFileName(void) const
Return the filename corresponding to this sheet.
Definition: sch_sheet.cpp:645
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:92
void DIALOG_SHIM::OnPaint ( wxPaintEvent &  event)
inherited

Definition at line 265 of file dialog_shim.cpp.

References DIALOG_SHIM::m_fixupsRun, and recursiveDescent().

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

266 {
267  if( !m_fixupsRun )
268  {
269 #if DLGSHIM_SELECT_ALL_IN_TEXT_CONTROLS
270  const bool selectAllInTextCtrls = true;
271 #else
272  const bool selectAllInTextCtrls = false;
273 #endif
274  wxWindow* firstTextCtrl = NULL;
275  wxWindow* windowWithFocus = NULL;
276 
277  recursiveDescent( GetChildren(), selectAllInTextCtrls, firstTextCtrl,
278  windowWithFocus );
279 
280 #if DLGSHIM_USE_SETFOCUS
281  // While it would be nice to honour any focus already set (which was
282  // recorded in windowWithFocus), the reality is that it's currently wrong
283  // far more often than it's right.
284  // So just focus on the first text control if we have one; otherwise the
285  // focus on the dialog itself, which will at least allow esc, return, etc.
286  // to function.
287  if( firstTextCtrl )
288  firstTextCtrl->SetFocus();
289  else
290  SetFocus();
291 #endif
292 
293 #ifdef __WXMAC__
294  fixOSXCancelButtonIssue( this );
295 #endif
296 
297  m_fixupsRun = true;
298  }
299 
300  event.Skip();
301 }
static void recursiveDescent(wxWindowList &children, const bool selectTextInTextCtrls, wxWindow *&firstTextCtrl, wxWindow *&windowWithFocus)
bool m_fixupsRun
Definition: dialog_shim.h:149
void DIALOG_PLOT_SCHEMATIC::OnPlotFormatSelection ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_PLOT_SCHEMATIC_BASE.

Definition at line 246 of file dialog_plot_schematic.cpp.

References GetPlotFileFormat(), DIALOG_PLOT_SCHEMATIC_BASE::m_DefaultLineSizeCtrl, DIALOG_PLOT_SCHEMATIC_BASE::m_paperHPGLSizer, DIALOG_PLOT_SCHEMATIC_BASE::m_paperOptionsSizer, DIALOG_PLOT_SCHEMATIC_BASE::m_PaperSizeOption, PLOT_FORMAT_DXF, PLOT_FORMAT_HPGL, PLOT_FORMAT_PDF, PLOT_FORMAT_POST, and PLOT_FORMAT_SVG.

Referenced by initDlg(), and PrjConfigChanged().

247 {
248 
249  switch( GetPlotFileFormat() )
250  {
251  default:
252  case PLOT_FORMAT_POST:
255  m_PaperSizeOption->Enable( true );
256  m_DefaultLineSizeCtrl->Enable( true );
257  break;
258 
259  case PLOT_FORMAT_PDF:
262  m_PaperSizeOption->Enable( true );
263  m_DefaultLineSizeCtrl->Enable( true );
264  break;
265 
266  case PLOT_FORMAT_SVG:
269  m_PaperSizeOption->Enable( false );
270  m_DefaultLineSizeCtrl->Enable( true );
271  break;
272 
273  case PLOT_FORMAT_DXF:
276  m_PaperSizeOption->Enable( false );
277  m_DefaultLineSizeCtrl->Enable( false );
278  break;
279 
280  case PLOT_FORMAT_HPGL:
283  m_DefaultLineSizeCtrl->Enable( false );
284  break;
285 
286  }
287 
288  GetSizer()->SetSizeHints( this );
289 }
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 200 of file plot_schematic_HPGL.cpp.

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

Referenced by createHPGLFile(), and SetPlotOriginCenter().

206 {
207  HPGL_PLOTTER* plotter = new HPGL_PLOTTER();
208 
209  plotter->SetPageSettings( aPageInfo );
210  // Currently, plot units are in decimil
211  plotter->SetViewport( aPlot0ffset, IU_PER_MILS/10, aScale, false );
212 
213  // Init :
214  plotter->SetCreator( wxT( "Eeschema-HPGL" ) );
215 
216  if( ! plotter->OpenFile( aFileName ) )
217  {
218  delete plotter;
219  return false;
220  }
221 
222  LOCALE_IO toggle;
223 
224  // Pen num and pen speed are not initialized here.
225  // Default HPGL driver values are used
226  plotter->SetPenDiameter( m_HPGLPenSize );
227  plotter->StartPlot();
228 
229  plotter->SetColor( BLACK );
230 
231  if( getPlotFrameRef() )
232  PlotWorkSheet( plotter, m_parent->GetTitleBlock(),
234  aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
236  aScreen->GetFileName() );
237 
238  aScreen->Plot( plotter );
239 
240  plotter->EndPlot();
241  delete plotter;
242 
243  return true;
244 }
virtual bool EndPlot() override
HPGL end of plot: pen return and release.
virtual void SetColor(COLOR4D color) override
Definition: plotter.h:603
int m_ScreenNumber
Definition: base_screen.h:216
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:160
Class LOCALE_IO is a class that can be instantiated within a scope in which you are expecting excepti...
Definition: common.h:166
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
Definition: plotter.cpp:82
const wxString & GetFileName() const
Definition: sch_screen.h:120
virtual void SetPenDiameter(double diameter)
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.cpp:538
virtual bool StartPlot() override
At the start of the HPGL plot pen speed and number are requested.
void PlotWorkSheet(PLOTTER *plotter, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, int aSheetNumber, int aNumberOfSheets, const wxString &aSheetDesc, const wxString &aFilename)
virtual void SetViewport(const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
virtual wxString GetScreenDesc() const override
void Plot(PLOTTER *aPlotter)
Plot all the schematic objects to aPlotter.
Definition: sch_screen.cpp:556
const PAGE_INFO & GetPageSettings() const override
const TITLE_BLOCK & GetTitleBlock() const override
int m_NumberOfScreens
Definition: base_screen.h:217
Definition: colors.h:45
bool DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF ( const wxString &  aFileName,
SCH_SCREEN aScreen,
wxPoint  aPlot0ffset,
double  aScale,
bool  aPlotFrameRef 
)
private

Definition at line 106 of file plot_schematic_DXF.cpp.

References DXF_PLOTTER::EndPlot(), SCH_SCREEN::GetFileName(), getModeColor(), SCH_SCREEN::GetPageSettings(), SCH_BASE_FRAME::GetPageSettings(), SCH_EDIT_FRAME::GetScreenDesc(), SCH_BASE_FRAME::GetTitleBlock(), BASE_SCREEN::m_NumberOfScreens, m_parent, BASE_SCREEN::m_ScreenNumber, PLOTTER::OpenFile(), SCH_SCREEN::Plot(), PlotWorkSheet(), PLOTTER::SetColorMode(), PLOTTER::SetCreator(), PLOTTER::SetPageSettings(), DXF_PLOTTER::SetViewport(), and DXF_PLOTTER::StartPlot().

Referenced by CreateDXFFile(), and setPlotFrameRef().

111 {
112  DXF_PLOTTER* plotter = new DXF_PLOTTER();
113 
114  const PAGE_INFO& pageInfo = aScreen->GetPageSettings();
115  plotter->SetPageSettings( pageInfo );
116  plotter->SetColorMode( getModeColor() );
117  // Currently, plot units are in decimil
118  plotter->SetViewport( aPlotOffset, IU_PER_MILS/10, aScale, false );
119 
120  // Init :
121  plotter->SetCreator( wxT( "Eeschema-DXF" ) );
122 
123  if( ! plotter->OpenFile( aFileName ) )
124  {
125  delete plotter;
126  return false;
127  }
128 
129  LOCALE_IO toggle;
130 
131  plotter->StartPlot();
132 
133  if( aPlotFrameRef )
134  {
135  PlotWorkSheet( plotter, m_parent->GetTitleBlock(),
137  aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
139  aScreen->GetFileName() );
140  }
141 
142  aScreen->Plot( plotter );
143 
144  // finish
145  plotter->EndPlot();
146  delete plotter;
147 
148  return true;
149 }
int m_ScreenNumber
Definition: base_screen.h:216
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:160
Class LOCALE_IO is a class that can be instantiated within a scope in which you are expecting excepti...
Definition: common.h:166
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&#39;t support line widths and mirroring...
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
Definition: plotter.cpp:82
const wxString & GetFileName() const
Definition: sch_screen.h:120
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.cpp:538
void PlotWorkSheet(PLOTTER *plotter, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, int aSheetNumber, int aNumberOfSheets, const wxString &aSheetDesc, const wxString &aFilename)
virtual wxString GetScreenDesc() const override
virtual bool StartPlot() override
Opens the DXF plot with a skeleton header.
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:49
virtual bool EndPlot() override
void Plot(PLOTTER *aPlotter)
Plot all the schematic objects to aPlotter.
Definition: sch_screen.cpp:556
const PAGE_INFO & GetPageSettings() const override
const TITLE_BLOCK & GetTitleBlock() const override
int m_NumberOfScreens
Definition: base_screen.h:217
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:115
virtual void SetColorMode(bool _color_mode)
Definition: plotter.h:125
void DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF ( PLOTTER aPlotter,
SCH_SCREEN aScreen,
bool  aPlotFrameRef 
)
private

Definition at line 145 of file plot_schematic_PDF.cpp.

References BLACK, SCH_SCREEN::GetFileName(), SCH_BASE_FRAME::GetPageSettings(), SCH_EDIT_FRAME::GetScreenDesc(), SCH_BASE_FRAME::GetTitleBlock(), BASE_SCREEN::m_NumberOfScreens, m_parent, BASE_SCREEN::m_ScreenNumber, SCH_SCREEN::Plot(), PlotWorkSheet(), and PLOTTER::SetColor().

Referenced by createPDFFile(), and setPlotFrameRef().

148 {
149  if( aPlotFrameRef )
150  {
151  aPlotter->SetColor( BLACK );
152  PlotWorkSheet( aPlotter, m_parent->GetTitleBlock(),
154  aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
156  aScreen->GetFileName() );
157  }
158 
159  aScreen->Plot( aPlotter );
160 }
int m_ScreenNumber
Definition: base_screen.h:216
virtual void SetColor(COLOR4D color)=0
const wxString & GetFileName() const
Definition: sch_screen.h:120
void PlotWorkSheet(PLOTTER *plotter, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, int aSheetNumber, int aNumberOfSheets, const wxString &aSheetDesc, const wxString &aFilename)
virtual wxString GetScreenDesc() const override
void Plot(PLOTTER *aPlotter)
Plot all the schematic objects to aPlotter.
Definition: sch_screen.cpp:556
const PAGE_INFO & GetPageSettings() const override
const TITLE_BLOCK & GetTitleBlock() const override
int m_NumberOfScreens
Definition: base_screen.h:217
Definition: colors.h:45
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 131 of file plot_schematic_PS.cpp.

References BLACK, PS_PLOTTER::EndPlot(), GetDefaultLineThickness(), SCH_SCREEN::GetFileName(), getModeColor(), SCH_BASE_FRAME::GetPageSettings(), SCH_EDIT_FRAME::GetScreenDesc(), SCH_BASE_FRAME::GetTitleBlock(), BASE_SCREEN::m_NumberOfScreens, m_parent, BASE_SCREEN::m_ScreenNumber, PLOTTER::OpenFile(), SCH_SCREEN::Plot(), PlotWorkSheet(), PSLIKE_PLOTTER::SetColor(), PLOTTER::SetColorMode(), PLOTTER::SetCreator(), PSLIKE_PLOTTER::SetDefaultLineWidth(), PLOTTER::SetPageSettings(), PS_PLOTTER::SetViewport(), and PS_PLOTTER::StartPlot().

Referenced by createPSFile(), and SetPlotOriginCenter().

137 {
138  PS_PLOTTER* plotter = new PS_PLOTTER();
139  plotter->SetPageSettings( aPageInfo );
141  plotter->SetColorMode( getModeColor() );
142  // Currently, plot units are in decimil
143  plotter->SetViewport( aPlot0ffset, IU_PER_MILS/10, aScale, false );
144 
145  // Init :
146  plotter->SetCreator( wxT( "Eeschema-PS" ) );
147 
148  if( ! plotter->OpenFile( aFileName ) )
149  {
150  delete plotter;
151  return false;
152  }
153 
154  LOCALE_IO toggle; // Switch the locale to standard C
155 
156  plotter->StartPlot();
157 
158  if( aPlotFrameRef )
159  {
160  plotter->SetColor( BLACK );
161  PlotWorkSheet( plotter, m_parent->GetTitleBlock(),
163  aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
165  aScreen->GetFileName() );
166  }
167 
168  aScreen->Plot( plotter );
169 
170  plotter->EndPlot();
171  delete plotter;
172 
173  return true;
174 }
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:403
int m_ScreenNumber
Definition: base_screen.h:216
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:160
Class LOCALE_IO is a class that can be instantiated within a scope in which you are expecting excepti...
Definition: common.h:166
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
Definition: plotter.cpp:82
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i...
const wxString & GetFileName() const
Definition: sch_screen.h:120
virtual bool EndPlot() override
Definition: PS_plotter.cpp:928
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.cpp:538
void PlotWorkSheet(PLOTTER *plotter, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, int aSheetNumber, int aNumberOfSheets, const wxString &aSheetDesc, const wxString &aFilename)
virtual wxString GetScreenDesc() const override
virtual bool StartPlot() override
The code within this function (and the CloseFilePS function) creates postscript files whose contents ...
Definition: PS_plotter.cpp:774
virtual void SetDefaultLineWidth(int width) override
Set the default line width.
Definition: PS_plotter.cpp:52
virtual void SetColor(COLOR4D color) override
The SetColor implementation is split with the subclasses: The PSLIKE computes the rgb values...
Definition: PS_plotter.cpp:59
void Plot(PLOTTER *aPlotter)
Plot all the schematic objects to aPlotter.
Definition: sch_screen.cpp:556
const PAGE_INFO & GetPageSettings() const override
const TITLE_BLOCK & GetTitleBlock() const override
int m_NumberOfScreens
Definition: base_screen.h:217
Definition: colors.h:45
virtual void SetColorMode(bool _color_mode)
Definition: plotter.h:125
bool DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG ( EDA_DRAW_FRAME aFrame,
const wxString &  aFileName,
SCH_SCREEN aScreen,
bool  aPlotBlackAndWhite,
bool  aPlotFrameRef 
)
static

Definition at line 102 of file plot_schematic_SVG.cpp.

References BLACK, SVG_PLOTTER::EndPlot(), GetDefaultLineThickness(), SCH_SCREEN::GetFileName(), SCH_SCREEN::GetPageSettings(), EDA_DRAW_FRAME::GetPageSettings(), EDA_DRAW_FRAME::GetScreenDesc(), EDA_DRAW_FRAME::GetTitleBlock(), BASE_SCREEN::m_NumberOfScreens, BASE_SCREEN::m_ScreenNumber, PLOTTER::OpenFile(), SCH_SCREEN::Plot(), PlotWorkSheet(), scale, SVG_PLOTTER::SetColor(), PLOTTER::SetColorMode(), PLOTTER::SetCreator(), PSLIKE_PLOTTER::SetDefaultLineWidth(), PLOTTER::SetPageSettings(), SVG_PLOTTER::SetViewport(), and SVG_PLOTTER::StartPlot().

Referenced by createSVGFile(), and SetPlotOriginCenter().

107 {
108  SVG_PLOTTER* plotter = new SVG_PLOTTER();
109 
110  const PAGE_INFO& pageInfo = aScreen->GetPageSettings();
111  plotter->SetPageSettings( pageInfo );
113  plotter->SetColorMode( aPlotBlackAndWhite ? false : true );
114  wxPoint plot_offset;
115  double scale = 1.0;
116  // Currently, plot units are in decimil
117  plotter->SetViewport( plot_offset, IU_PER_MILS/10, scale, false );
118 
119  // Init :
120  plotter->SetCreator( wxT( "Eeschema-SVG" ) );
121 
122  if( ! plotter->OpenFile( aFileName ) )
123  {
124  delete plotter;
125  return false;
126  }
127 
128  LOCALE_IO toggle;
129 
130  plotter->StartPlot();
131 
132  if( aPlotFrameRef )
133  {
134  plotter->SetColor( BLACK );
135  PlotWorkSheet( plotter, aFrame->GetTitleBlock(),
136  aFrame->GetPageSettings(),
137  aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
138  aFrame->GetScreenDesc(),
139  aScreen->GetFileName() );
140  }
141 
142  aScreen->Plot( plotter );
143 
144  plotter->EndPlot();
145  delete plotter;
146 
147  return true;
148 }
int m_ScreenNumber
Definition: base_screen.h:216
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:160
virtual const TITLE_BLOCK & GetTitleBlock() const =0
Class LOCALE_IO is a class that can be instantiated within a scope in which you are expecting excepti...
Definition: common.h:166
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
int GetDefaultLineThickness()
Default line thickness used to draw/plot items having a default thickness line value (i...
const wxString & GetFileName() const
Definition: sch_screen.h:120
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.cpp:538
void PlotWorkSheet(PLOTTER *plotter, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, int aSheetNumber, int aNumberOfSheets, const wxString &aSheetDesc, const wxString &aFilename)
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:52
virtual wxString GetScreenDesc() const
Definition: worksheet.cpp:119
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:49
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:556
const int scale
int m_NumberOfScreens
Definition: base_screen.h:217
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:115
Definition: colors.h:45
virtual void SetColorMode(bool _color_mode)
Definition: plotter.h:125
void DIALOG_PLOT_SCHEMATIC::PlotSchematic ( bool  aPlotAll)
private

Definition at line 304 of file dialog_plot_schematic.cpp.

References CreateDXFFile(), createHPGLFile(), createPDFFile(), createPSFile(), createSVGFile(), GetPlotFileFormat(), getPlotFrameRef(), getPlotOptions(), PLOT_FORMAT_DXF, PLOT_FORMAT_HPGL, PLOT_FORMAT_PDF, PLOT_FORMAT_POST, and PLOT_FORMAT_SVG.

Referenced by OnButtonPlotAllClick(), OnButtonPlotCurrentClick(), and setPlotFrameRef().

305 {
306  getPlotOptions();
307 
308  switch( GetPlotFileFormat() )
309  {
310  case PLOT_FORMAT_HPGL:
311  createHPGLFile( aPlotAll, getPlotFrameRef() );
312  break;
313 
314  case PLOT_FORMAT_DXF:
315  CreateDXFFile( aPlotAll, getPlotFrameRef() );
316  break;
317 
318  case PLOT_FORMAT_PDF:
319  createPDFFile( aPlotAll, getPlotFrameRef() );
320  break;
321 
322  case PLOT_FORMAT_SVG:
323  createSVGFile( aPlotAll, getPlotFrameRef() );
324  break;
325 
326  case PLOT_FORMAT_POST:
327  // Fall through. Default to Postscript.
328  default:
329  createPSFile( aPlotAll, getPlotFrameRef() );
330  break;
331 
332  }
333 }
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)
PROJECT & KIWAY_HOLDER::Prj ( ) const
inherited

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

Definition at line 34 of file kiway_holder.cpp.

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

Referenced by SCH_EDIT_FRAME::AppendSchematic(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), DIALOG_SYMBOL_REMAP::backupProject(), LIB_VIEW_FRAME::BestZoom(), DIALOG_FOOTPRINT_FP_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_FOOTPRINT_BOARD_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::BrowseAndSelectDocFile(), DIALOG_SYMBOL_LIB_TABLE::browseLibrariesHandler(), CVPCB_MAINFRAME::BuildLIBRARY_LISTBOX(), DIALOG_FOOTPRINT_FP_EDITOR::Cfg3DPath(), DIALOG_FOOTPRINT_BOARD_EDITOR::Cfg3DPath(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::checkNewAlias(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), createPlotFileName(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary(), DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), 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_LIB_TABLE::DIALOG_SYMBOL_LIB_TABLE(), DIALOG_SYMBOL_REMAP::DIALOG_SYMBOL_REMAP(), LIB_VIEW_FRAME::DisplayLibInfos(), LIB_EDIT_FRAME::DisplayLibInfos(), SCH_BASE_FRAME::DisplayListComponentsInLib(), PCB_EDIT_FRAME::doAutoSave(), DIALOG_FOOTPRINT_FP_EDITOR::Edit3DShapeFileName(), DIALOG_FOOTPRINT_BOARD_EDITOR::Edit3DShapeFileName(), SCH_EDIT_FRAME::EditSheet(), PCB_EDIT_FRAME::Export_IDF3(), PCB_EDIT_FRAME::Files_io_from_id(), NETLIST_DIALOG::GenNetlist(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), FOOTPRINT_VIEWER_FRAME::getCurFootprintName(), LIB_EDIT_FRAME::GetCurLib(), FOOTPRINT_VIEWER_FRAME::getCurNickname(), FOOTPRINT_EDIT_FRAME::GetCurrentLib(), SCH_BASE_FRAME::GetLibAlias(), SCH_BASE_FRAME::GetLibPart(), FOOTPRINT_EDIT_FRAME::getLibPath(), LIB_EDIT_FRAME::getLibraryFileName(), DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable(), DIALOG_BOM::getPluginFileName(), LIB_VIEW_FRAME::getSelectedAlias(), FP_THREAD_IFACE::GetTable(), SCH_EDIT_FRAME::ImportFile(), PCB_EDIT_FRAME::ImportFile(), DIALOG_FOOTPRINT_FP_EDITOR::initModeditProperties(), DIALOG_FOOTPRINT_BOARD_EDITOR::InitModeditProperties(), PCB_EDIT_FRAME::InstallNetlistFrame(), SCH_EDIT_FRAME::IsSearchCacheObsolete(), KIWAY_HOLDER::Kiway(), SCH_EDIT_FRAME::Load_Component(), SCH_EDIT_FRAME::LoadCmpToFootprintLinkFile(), LIB_EDIT_FRAME::LoadComponentFromCurrentLib(), CVPCB_MAINFRAME::LoadFootprintFiles(), DIALOG_SPICE_MODEL::loadLibrary(), LIB_EDIT_FRAME::LoadOneSymbol(), CVPCB_MAINFRAME::LoadProjectFile(), SCH_EDIT_FRAME::LoadProjectFile(), PCB_EDIT_FRAME::LoadProjectSettings(), DIALOG_DRC_CONTROL::makeValidFileNameReport(), FOOTPRINT_VIEWER_FRAME::OnActivate(), DIALOG_GENCAD_EXPORT_OPTIONS::onBrowse(), DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick(), DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton(), CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), SCH_BASE_FRAME::OnEditSymbolLibTable(), DIALOG_GENDRILL::OnGenReportFile(), SCH_EDIT_FRAME::OnImportProject(), DIALOG_CHOOSE_COMPONENT::OnInitDialog(), PCB_EDIT_FRAME::OnLeftClick(), DIALOG_NETLIST::OnOpenNetlistClick(), DIALOG_PLOT::OnOutputDirectoryBrowseClicked(), DIALOG_SVG_PRINT::OnOutputDirectoryBrowseClicked(), OnOutputDirectoryBrowseClicked(), DIALOG_GENDRILL::OnOutputDirectoryBrowseClicked(), LIB_EDIT_FRAME::OnPlotCurrentComponent(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), SCH_EDIT_FRAME::OnRightClick(), DIALOG_BOM::OnRunPlugin(), SCH_EDIT_FRAME::OnSaveProject(), DIALOG_CHOOSE_COMPONENT::OnSchViewPaint(), DIALOG_SPICE_MODEL::onSelectLibrary(), LIB_VIEW_FRAME::OnSelectSymbol(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnTestChipName(), FOOTPRINT_EDIT_FRAME::OnUpdateSelectCurrentLib(), LIB_EDIT_FRAME::OnViewEntryDoc(), LIB_VIEW_FRAME::onViewSymbolDocument(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::PasteListOfItems(), PCB_EDITOR_CONTROL::PlaceModule(), DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector(), SCH_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Config(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList(), LIB_VIEW_FRAME::ReCreateHToolbar(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), LIB_VIEW_FRAME::ReCreateListCmp(), LIB_VIEW_FRAME::ReCreateListLib(), LIB_VIEW_FRAME::RedrawActiveWindow(), EDA_3D_VIEWER::ReloadRequest(), DIALOG_SYMBOL_REMAP::remapSymbolToLibTable(), FOOTPRINT_EDIT_FRAME::restoreLastFootprint(), FOOTPRINT_EDIT_FRAME::retainLastFootprint(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), LIB_EDIT_FRAME::saveLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), CVPCB_MAINFRAME::SaveProjectFile(), SCH_EDIT_FRAME::SaveProjectSettings(), PCB_EDIT_FRAME::SaveProjectSettings(), SCH_BASE_FRAME::saveSymbolLibTables(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), SCH_BASE_FRAME::SelectComponentFromLibrary(), FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint(), PCB_BASE_FRAME::SelectLibrary(), SCH_BASE_FRAME::SelectLibraryFromList(), LIB_EDIT_FRAME::selectSymLibTable(), SCH_EDIT_FRAME::sendNetlist(), FOOTPRINT_VIEWER_FRAME::setCurFootprintName(), LIB_EDIT_FRAME::SetCurLib(), FOOTPRINT_VIEWER_FRAME::setCurNickname(), LIB_EDIT_FRAME::SetCurPart(), DIALOG_CHOOSE_COMPONENT::ShowFootprintFor(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), LIB_MANAGER::symTable(), EDA_3D_VIEWER::takeScreenshot(), SIM_PLOT_FRAME::updateNetlistExporter(), SCH_SCREEN::UpdateSymbolLinks(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), CVPCB_MAINFRAME::UpdateTitle(), FOOTPRINT_EDIT_FRAME::updateTitle(), SCH_EDIT_FRAME::WriteNetListFile(), DIALOG_FOOTPRINT_BOARD_EDITOR::~DIALOG_FOOTPRINT_BOARD_EDITOR(), and DIALOG_FOOTPRINT_FP_EDITOR::~DIALOG_FOOTPRINT_FP_EDITOR().

35 {
36  return Kiway().Prj();
37 }
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_player.h:60
VTBL_ENTRY PROJECT & Prj() const
Function Prj returns the PROJECT associated with this KIWAY.
Definition: kiway.cpp:142
bool DIALOG_PLOT_SCHEMATIC::PrjConfigChanged ( )
inline
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 132 of file plot_schematic_PDF.cpp.

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(), and setPlotFrameRef().

134 {
135  aPlotter->EndPlot();
136  delete aPlotter;
137 
138  // Restore the previous sheet
139  m_parent->SetCurrentSheet( aOldsheetpath );
142 }
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.
void DIALOG_PLOT_SCHEMATIC::SetHPGLPenWidth ( )
private

Definition at line 98 of file plot_schematic_HPGL.cpp.

References m_HPGLPenSize, DIALOG_PLOT_SCHEMATIC_BASE::m_penHPGLWidthCtrl, and ValueFromTextCtrl().

Referenced by createHPGLFile(), and SetPlotOriginCenter().

99 {
101 
102  if( m_HPGLPenSize > Millimeter2iu( 2 ) )
103  m_HPGLPenSize = Millimeter2iu( 2 );
104 
105  if( m_HPGLPenSize < Millimeter2iu( 0.01 ) )
106  m_HPGLPenSize = Millimeter2iu( 0.01 );
107 }
int ValueFromTextCtrl(const wxTextCtrl &aTextCtr)
Convert the number Value in a string according to the internal units and the selected unit (g_UserUni...
Definition: base_units.cpp:385
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 41 of file kiway_holder.cpp.

References KIWAY_HOLDER::m_kiway, and name.

Referenced by DIALOG_SHIM::DIALOG_SHIM(), KIWAY_HOLDER::Kiway(), and SIM_PLOT_FRAME::SIM_PLOT_FRAME().

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

Definition at line 79 of file dialog_plot_schematic.h.

References GetPlotFileFormat(), DIALOG_PLOT_SCHEMATIC_BASE::m_ModeColorOption, and OnOutputDirectoryBrowseClicked().

Referenced by initDlg().

80  { m_ModeColorOption->SetSelection( aColor ? 0 : 1 ); }
void DIALOG_PLOT_SCHEMATIC::setPlotFrameRef ( bool  aPlot)
inlineprivate
void DIALOG_PLOT_SCHEMATIC::SetPlotOriginCenter ( bool  aCenter)
inlineprivate
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 118 of file dialog_shim.cpp.

Referenced by DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_EDIT_COMPONENTS_LIBID::DIALOG_EDIT_COMPONENTS_LIBID(), DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH(), DIALOG_SYMBOL_LIB_TABLE::DIALOG_SYMBOL_LIB_TABLE(), HOTKEYS_EDITOR_DIALOG::HOTKEYS_EDITOR_DIALOG(), HTML_MESSAGE_BOX::HTML_MESSAGE_BOX(), DIALOG_SHIM::IsQuasiModal(), DIALOG_LAYERS_SETUP::OnInitDialog(), and HTML_MESSAGE_BOX::SetDialogSizeInDU().

119 {
120  wxSize sz( x, y );
121  SetSize( ConvertDialogToPixels( sz ) );
122 }
void DIALOG_PLOT_SCHEMATIC::setupPlotPagePDF ( PLOTTER aPlotter,
SCH_SCREEN aScreen 
)
private

Definition at line 163 of file plot_schematic_PDF.cpp.

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

Referenced by createPDFFile(), and setPlotFrameRef().

164 {
165  PAGE_INFO plotPage; // page size selected to plot
166  // Considerations on page size and scaling requests
167  const PAGE_INFO& actualPage = aScreen->GetPageSettings(); // page size selected in schematic
168 
169  switch( m_pageSizeSelect )
170  {
171  case PAGE_SIZE_A:
172  plotPage.SetType( wxT( "A" ) );
173  plotPage.SetPortrait( actualPage.IsPortrait() );
174  break;
175 
176  case PAGE_SIZE_A4:
177  plotPage.SetType( wxT( "A4" ) );
178  plotPage.SetPortrait( actualPage.IsPortrait() );
179  break;
180 
181  case PAGE_SIZE_AUTO:
182  default:
183  plotPage = actualPage;
184  break;
185  }
186 
187  double scalex = (double) plotPage.GetWidthMils() / actualPage.GetWidthMils();
188  double scaley = (double) plotPage.GetHeightMils() / actualPage.GetHeightMils();
189  double scale = std::min( scalex, scaley );
190  aPlotter->SetPageSettings( plotPage );
191  // Currently, plot units are in decimil
192  aPlotter->SetViewport( wxPoint( 0, 0 ), IU_PER_MILS/10, scale, false );
193 }
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
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.cpp:538
bool IsPortrait() const
Definition: page_info.h:116
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:49
int GetWidthMils() const
Definition: page_info.h:132
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
const PAGE_INFO & GetPageSettings() const
Definition: sch_screen.h:115
void SetPortrait(bool aIsPortrait)
Function SetPortrait will rotate the paper page 90 degrees.
Definition: page_info.cpp:182
int GetHeightMils() const
Definition: page_info.h:135
#define min(a, b)
Definition: auxiliary.h:85
bool DIALOG_SHIM::Show ( bool  show)
overrideinherited

Definition at line 146 of file dialog_shim.cpp.

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

Referenced by DisplayHotkeyList(), DIALOG_SHIM::EndQuasiModal(), InvokeDialogERC(), DIALOG_SHIM::IsQuasiModal(), DIALOG_SCH_FIND::OnCancel(), DIALOG_DRC_CONTROL::OnLeftDClickClearance(), DIALOG_DRC_CONTROL::OnLeftDClickUnconnected(), DIALOG_DRC_CONTROL::OnPopupMenu(), DIALOG_EXCHANGE_FOOTPRINTS::OnQuit(), POSITION_RELATIVE_TOOL::PositionRelative(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), SCH_COMPONENT::SetPosition(), DRC::ShowDRCDialog(), and DIALOG_SHIM::ShowQuasiModal().

147 {
148  bool ret;
149  const char* hash_key;
150 
151  if( m_hash_key.size() )
152  {
153  // a special case like EDA_LIST_DIALOG, which has multiple uses.
154  hash_key = m_hash_key.c_str();
155  }
156  else
157  {
158  hash_key = typeid(*this).name();
159  }
160 
161  // Show or hide the window. If hiding, save current position and size.
162  // If showing, use previous position and size.
163  if( show )
164  {
165 #ifndef __WINDOWS__
166  wxDialog::Raise(); // Needed on OS X and some other window managers (i.e. Unity)
167 #endif
168  ret = wxDialog::Show( show );
169 
170  // classname is key, returns a zeroed out default EDA_RECT if none existed before.
171  EDA_RECT savedDialogRect = class_map[ hash_key ];
172 
173  if( savedDialogRect.GetSize().x != 0 && savedDialogRect.GetSize().y != 0 )
174  {
175  SetSize( savedDialogRect.GetPosition().x,
176  savedDialogRect.GetPosition().y,
177  std::max( wxDialog::GetSize().x, savedDialogRect.GetSize().x ),
178  std::max( wxDialog::GetSize().y, savedDialogRect.GetSize().y ),
179  0 );
180  }
181  }
182  else
183  {
184  // Save the dialog's position & size before hiding, using classname as key
185  class_map[ hash_key ] = EDA_RECT( wxDialog::GetPosition(), wxDialog::GetSize() );
186 
187 #ifdef __WXMAC__
188  if ( m_eventLoop )
189  m_eventLoop->Exit( GetReturnCode() ); // Needed for APP-MODAL dlgs on OSX
190 #endif
191 
192  ret = wxDialog::Show( show );
193  }
194 
195  return ret;
196 }
const wxSize GetSize() const
Definition: eda_rect.h:101
std::string m_hash_key
Definition: dialog_shim.h:151
static RECT_MAP class_map
const wxPoint GetPosition() const
Definition: eda_rect.h:113
#define max(a, b)
Definition: auxiliary.h:86
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
int DIALOG_SHIM::ShowQuasiModal ( )
inherited

Definition at line 552 of file dialog_shim.cpp.

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

Referenced by SCH_EDIT_FRAME::EditComponent(), SCH_EDIT_FRAME::EditComponentFieldText(), LIB_EDIT_FRAME::EditField(), EDIT_TOOL::ExchangeFootprints(), PCB_EDIT_FRAME::InstallExchangeModuleFrame(), LIB_EDIT_FRAME::InstallFieldsEditorDialog(), SCH_EDIT_FRAME::InstallHierarchyFrame(), InvokeDialogCreateBOMEditor(), InvokeDialogEditComponentsLibId(), InvokeDialogUpdateFields(), SCH_EDIT_FRAME::OnRemapSymbols(), LIB_VIEW_FRAME::OnSelectSymbol(), SCH_EDIT_FRAME::OpenProjectFiles(), and SCH_BASE_FRAME::SelectComponentFromLibrary().

553 {
554  // This is an exception safe way to zero a pointer before returning.
555  // Yes, even though DismissModal() clears this first normally, this is
556  // here in case there's an exception before the dialog is dismissed.
557  struct NULLER
558  {
559  void*& m_what;
560  NULLER( void*& aPtr ) : m_what( aPtr ) {}
561  ~NULLER() { m_what = 0; } // indeed, set it to NULL on destruction
562  } clear_this( (void*&) m_qmodal_loop );
563 
564  // release the mouse if it's currently captured as the window having it
565  // will be disabled when this dialog is shown -- but will still keep the
566  // capture making it impossible to do anything in the modal dialog itself
567  wxWindow* win = wxWindow::GetCapture();
568  if( win )
569  win->ReleaseMouse();
570 
571  // Get the optimal parent
572  wxWindow* parent = GetParentForModalDialog( GetParent(), GetWindowStyle() );
573 
574  // Show the optimal parent
575  DBG( if( parent ) printf( "%s: optimal parent: %s\n", __func__, typeid(*parent).name() );)
576 
577  wxASSERT_MSG( !m_qmodal_parent_disabler,
578  wxT( "Caller using ShowQuasiModal() twice on same window?" ) );
579 
580  // quasi-modal: disable only my "optimal" parent
582 
583 #ifdef __WXMAC__
584  // Apple in its infinite wisdom will raise a disabled window before even passing
585  // us the event, so we have no way to stop it. Instead, we must set an order on
586  // the windows so that the quasi-modal will be pushed in front of the disabled
587  // window when it is raised.
588  ReparentQuasiModal();
589 #endif
590  Show( true );
591 
592  m_qmodal_showing = true;
593 
594  EVENT_LOOP event_loop;
595 
596  m_qmodal_loop = &event_loop;
597 
598  event_loop.Run();
599 
600  return GetReturnCode();
601 }
bool m_qmodal_showing
Definition: dialog_shim.h:155
EVENT_LOOP * m_qmodal_loop
Definition: dialog_shim.h:154
bool Show(bool show) override
WDO_ENABLE_DISABLE * m_qmodal_parent_disabler
Definition: dialog_shim.h:156
Toggle a window&#39;s "enable" status to disabled, then enabled on destruction.
Definition: dialog_shim.cpp:33
#define DBG(x)
Definition: fctsys.h:33
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 132 of file dialog_shim.cpp.

Referenced by DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT(), DIALOG_SHIM::IsQuasiModal(), and DIALOG_LAYERS_SETUP::OnInitDialog().

133 {
134  wxSize sz( 0, y );
135  return ConvertDialogToPixels( sz ).y;
136 }

Member Data Documentation

wxBitmapButton* DIALOG_PLOT_SCHEMATIC_BASE::m_browseButton
protectedinherited
wxButton* DIALOG_PLOT_SCHEMATIC_BASE::m_buttonPlotAll
protectedinherited
wxButton* DIALOG_PLOT_SCHEMATIC_BASE::m_buttonPlotCurrent
protectedinherited
wxButton* DIALOG_PLOT_SCHEMATIC_BASE::m_buttonQuit
protectedinherited
wxBoxSizer* DIALOG_PLOT_SCHEMATIC_BASE::m_ButtonsSizer
protectedinherited
wxConfigBase* DIALOG_PLOT_SCHEMATIC::m_config
private

Definition at line 50 of file dialog_plot_schematic.h.

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

bool DIALOG_PLOT_SCHEMATIC::m_configChanged
private

Definition at line 51 of file dialog_plot_schematic.h.

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

wxTextCtrl* DIALOG_PLOT_SCHEMATIC_BASE::m_DefaultLineSizeCtrl
protectedinherited
wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_defaultLineWidthTitle
protectedinherited
bool DIALOG_SHIM::m_fixupsRun
protectedinherited

Definition at line 149 of file dialog_shim.h.

Referenced by DIALOG_SHIM::OnPaint().

std::string DIALOG_SHIM::m_hash_key
protectedinherited
wxChoice* DIALOG_PLOT_SCHEMATIC_BASE::m_HPGLPaperSizeOption
protectedinherited
int DIALOG_PLOT_SCHEMATIC::m_HPGLPaperSizeSelect
private

Definition at line 55 of file dialog_plot_schematic.h.

Referenced by getPlotOptions(), and initDlg().

double DIALOG_PLOT_SCHEMATIC::m_HPGLPenSize
private

Definition at line 56 of file dialog_plot_schematic.h.

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

WX_HTML_REPORT_PANEL* DIALOG_PLOT_SCHEMATIC_BASE::m_MessagesBox
protectedinherited
wxRadioBox* DIALOG_PLOT_SCHEMATIC_BASE::m_ModeColorOption
protectedinherited
wxBoxSizer* DIALOG_PLOT_SCHEMATIC_BASE::m_optionsSizer
protectedinherited
wxTextCtrl* DIALOG_PLOT_SCHEMATIC_BASE::m_outputDirectoryName
protectedinherited
int DIALOG_PLOT_SCHEMATIC::m_pageSizeSelect = PAGE_SIZE_AUTO
staticprivate

Definition at line 52 of file dialog_plot_schematic.h.

Referenced by createPSFile(), getPlotOptions(), initDlg(), and setupPlotPagePDF().

wxStaticBoxSizer* DIALOG_PLOT_SCHEMATIC_BASE::m_paperHPGLSizer
protectedinherited
wxStaticBoxSizer* DIALOG_PLOT_SCHEMATIC_BASE::m_paperOptionsSizer
protectedinherited
wxRadioBox* DIALOG_PLOT_SCHEMATIC_BASE::m_PaperSizeOption
protectedinherited
wxTextCtrl* DIALOG_PLOT_SCHEMATIC_BASE::m_penHPGLWidthCtrl
protectedinherited
wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_penHPLGWidthTitle
protectedinherited
wxRadioBox* DIALOG_PLOT_SCHEMATIC_BASE::m_plotFormatOpt
protectedinherited
wxCheckBox* DIALOG_PLOT_SCHEMATIC_BASE::m_PlotFrameRefOpt
protectedinherited
wxRadioBox* DIALOG_PLOT_SCHEMATIC_BASE::m_plotOriginOpt
protectedinherited
EVENT_LOOP* DIALOG_SHIM::m_qmodal_loop
protectedinherited

Definition at line 154 of file dialog_shim.h.

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

WDO_ENABLE_DISABLE* DIALOG_SHIM::m_qmodal_parent_disabler
protectedinherited
bool DIALOG_SHIM::m_qmodal_showing
protectedinherited
wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_staticText4
protectedinherited
wxStaticText* DIALOG_PLOT_SCHEMATIC_BASE::m_staticTextOutputDirectory
protectedinherited

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