55        wxASSERT( aParent != 
nullptr );
 
 
   60    bool HasPage( 
int aPageNum )
 override { 
return ( aPageNum <= 2 ); }
 
   61    void GetPageInfo( 
int* minPage, 
int* maxPage, 
int* selPageFrom, 
int* selPageTo ) 
override;
 
 
   76                            const wxString& aTitle, 
const wxPoint& aPos = wxDefaultPosition,
 
   77                            const wxSize& aSize = wxDefaultSize ) :
 
   78        wxPreviewFrame( aPreview, aParent, aTitle, aPos, aSize )
 
 
   83    bool Show( 
bool show )
 override 
   96                s_pos = wxDefaultPosition;
 
  105            ret = wxPreviewFrame::Show( show );
 
  111            s_pos  = GetPosition();
 
  113            ret = wxPreviewFrame::Show( show );
 
 
  126    DECLARE_EVENT_TABLE()
 
 
  151                                     int* selPageFrom, 
int* selPageTo )
 
  153    *minPage = *selPageFrom = 1;
 
  154    *maxPage = *selPageTo   = 2;
 
 
  173    FitThisSizeToPaper( pageSizeIU );
 
  174    fitRect = GetLogicalPaperRect();
 
  176    int xoffset = ( fitRect.width - pageSizeIU.x ) / 2;
 
  177    int yoffset = ( fitRect.height - pageSizeIU.y ) / 2;
 
  179    OffsetLogicalOrigin( xoffset, yoffset );
 
  209    m_parent->SetDrawBgColor( bg_color );
 
  218    m_parent->GetCanvas()->DisplayDrawingSheet();
 
 
  223                       wxPageSetupDialogData* aPageSetupData )
 
  227    wxPrintDialogData printDialogData( *aPrintData );
 
  228    printDialogData.SetMaxPage( pageCount );
 
  231        printDialogData.EnablePageNumbers( 
true );
 
  233    wxPrinter printer( &printDialogData );
 
  236    if( !printer.Print( aCaller, &printout, 
true ) )
 
  238        if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
 
  239            wxMessageBox( 
_( 
"An error occurred attempting to print the drawing sheet." ),
 
  240                          _( 
"Printing" ), wxOK );
 
  244    *aPageSetupData = printer.GetPrintDialogData().GetPrintData();
 
 
  253    wxString        title   = 
_( 
"Preview" );
 
  254    wxPrintPreview* preview = 
new wxPrintPreview( 
new PLEDITOR_PRINTOUT( aCaller, title ),
 
  258    preview->SetZoom( 70 );
 
 
constexpr EDA_IU_SCALE drawSheetIUScale
 
Handles how to draw a screen (a board, a schematic ...)
 
void SetVirtualPageNumber(int aPageNumber)
 
VECTOR2I m_DrawOrg
offsets for drawing the circuit on the screen
 
VECTOR2I m_StartVisu
Coordinates in drawing units of the current view position (upper left corner of device)
 
This class handle bitmap images in KiCad.
 
void SetPixelSizeIu(double aPixSize)
 
Drawing sheet structure type definitions.
 
Handle the graphic items list to draw/plot the frame and title block.
 
static DS_DATA_MODEL & GetTheInstance()
Return the instance of DS_DATA_MODEL used in the application.
 
std::vector< DS_DATA_ITEM * > & GetItems()
 
A color representation with 4 components: red, green, blue, alpha.
 
Store page-layout-specific render settings.
 
void SetDefaultPenWidth(int aWidth)
 
void SetLayerColor(int aLayer, const COLOR4D &aColor)
Change the color used to draw a layer.
 
void SetPrintDC(wxDC *aDC)
 
Custom print preview frame.
 
PLEDITOR_PREVIEW_FRAME(wxPrintPreview *aPreview, PL_EDITOR_FRAME *aParent, const wxString &aTitle, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxDefaultSize)
 
bool Show(bool show) override
 
PL_EDITOR_FRAME * m_parent
 
Custom print out for printing schematics.
 
bool OnPrintPage(int aPageNum) override
 
PL_EDITOR_FRAME * m_parent
 
void PrintPage(int aPageNum)
 
PLEDITOR_PRINTOUT(PL_EDITOR_FRAME *aParent, const wxString &aTitle)
 
bool HasPage(int aPageNum) override
 
void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo) override
 
The main window used in the drawing sheet editor.
 
int InvokeDialogPrintPreview(PL_EDITOR_FRAME *aCaller, wxPrintData *aPrintData)
Create and show a print preview dialog returns 1 if OK, 0 , there is a problem.
 
int InvokeDialogPrint(PL_EDITOR_FRAME *aCaller, wxPrintData *aPrintData, wxPageSetupDialogData *aPageSetupData)
Create and show a print dialog returns 1 if OK, 0 , there is a problem.
 
void GRForceBlackPen(bool flagforce)
 
void GRResetPenAndBrush(wxDC *DC)
 
@ LAYER_DRAWINGSHEET
Sheet frame and title block.
 
VECTOR2< int32_t > VECTOR2I
 
wxSize ToWxSize(const VECTOR2I &aSize)