KiCad PCB EDA Suite
SCH_PREVIEW_FRAME Class Reference

Custom schematic print preview frame. More...

Inheritance diagram for SCH_PREVIEW_FRAME:

Public Member Functions

 SCH_PREVIEW_FRAME (wxPrintPreview *aPreview, wxWindow *aParent, const wxString &aTitle, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxDefaultSize)
 
bool Show (bool show) override
 

Static Private Attributes

static wxPoint s_pos
 
static wxSize s_size
 

Detailed Description

Custom schematic print preview frame.

This derived preview frame remembers its size and position during a session

Definition at line 86 of file dialog_print_using_printer.cpp.

Constructor & Destructor Documentation

◆ SCH_PREVIEW_FRAME()

SCH_PREVIEW_FRAME::SCH_PREVIEW_FRAME ( wxPrintPreview *  aPreview,
wxWindow *  aParent,
const wxString &  aTitle,
const wxPoint &  aPos = wxDefaultPosition,
const wxSize &  aSize = wxDefaultSize 
)
inline

Definition at line 89 of file dialog_print_using_printer.cpp.

91  :
92  wxPreviewFrame( aPreview, aParent, aTitle, aPos, aSize )
93  {
94  }

Member Function Documentation

◆ Show()

bool SCH_PREVIEW_FRAME::Show ( bool  show)
inlineoverride

Definition at line 96 of file dialog_print_using_printer.cpp.

97  {
98  bool ret;
99 
100  // Show or hide the window. If hiding, save current position and size.
101  // If showing, use previous position and size.
102  if( show )
103  {
104  ret = wxPreviewFrame::Show( show );
105 
106  if( s_size.x != 0 && s_size.y != 0 )
107  SetSize( s_pos.x, s_pos.y, s_size.x, s_size.y, 0 );
108  }
109  else
110  {
111  // Save the dialog's position & size before hiding
112  s_size = GetSize();
113  s_pos = GetPosition();
114 
115  ret = wxPreviewFrame::Show( show );
116  }
117 
118  return ret;
119  }

References s_pos, and s_size.

Referenced by DIALOG_PRINT_USING_PRINTER::OnPrintPreview().

Member Data Documentation

◆ s_pos

wxPoint SCH_PREVIEW_FRAME::s_pos
staticprivate

Definition at line 122 of file dialog_print_using_printer.cpp.

Referenced by Show().

◆ s_size

wxSize SCH_PREVIEW_FRAME::s_size
staticprivate

Definition at line 123 of file dialog_print_using_printer.cpp.

Referenced by Show().


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