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 100 of file eeschema/dialogs/dialog_print_using_printer.cpp.

Constructor & Destructor Documentation

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 103 of file eeschema/dialogs/dialog_print_using_printer.cpp.

105  :
106  wxPreviewFrame( aPreview, aParent, aTitle, aPos, aSize )
107  {
108  }

Member Function Documentation

bool SCH_PREVIEW_FRAME::Show ( bool  show)
inlineoverride

Definition at line 110 of file eeschema/dialogs/dialog_print_using_printer.cpp.

References s_pos, s_size, wxPoint::x, and wxPoint::y.

111  {
112  bool ret;
113 
114  // Show or hide the window. If hiding, save current position and size.
115  // If showing, use previous position and size.
116  if( show )
117  {
118  ret = wxPreviewFrame::Show( show );
119 
120  if( s_size.x != 0 && s_size.y != 0 )
121  SetSize( s_pos.x, s_pos.y, s_size.x, s_size.y, 0 );
122  }
123  else
124  {
125  // Save the dialog's position & size before hiding
126  s_size = GetSize();
127  s_pos = GetPosition();
128 
129  ret = wxPreviewFrame::Show( show );
130  }
131 
132  return ret;
133  }

Member Data Documentation

wxPoint SCH_PREVIEW_FRAME::s_pos
staticprivate

Definition at line 136 of file eeschema/dialogs/dialog_print_using_printer.cpp.

Referenced by Show().

wxSize SCH_PREVIEW_FRAME::s_size
staticprivate

Definition at line 137 of file eeschema/dialogs/dialog_print_using_printer.cpp.

Referenced by Show().


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