A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/print__handler__wx_8hpp_source.html below:

NCBI C++ ToolKit: include/gui/widgets/wx/print_handler_wx.hpp Source File

1 #ifndef GUI_WIDGETS_WX___PRINT_HANDLER_WX__HPP 2 #define GUI_WIDGETS_WX___PRINT_HANDLER_WX__HPP 40 #include "wx/printdlg.h" 66 #if(wxMAJOR_VERSION==2 && wxMINOR_VERSION<9) 111  float

units_per_cm) : wxPrintout( title )

135

wxPrintData printdata;

136

printdata.SetPrintMode( wxPRINT_MODE_PRINTER );

137

printdata.SetOrientation(

m_orient

);

138

printdata.SetNoCopies(1);

145  if

(showPageSetupDialog)

153  if

(dlg.ShowModal() == wxID_OK)

162

wxPoint marginTopLeft =

m_page_setup

.GetMarginTopLeft();

163

wxPoint marginBottomRight =

m_page_setup

.GetMarginBottomRight();

179

std::cout <<

"user canceled at first dialog"

<< std::endl;

238

std::cout <<

"beginning to print document, from page "

<< startPage

239

<<

" to "

<< endPage << std::endl;

240  return

wxPrintout::OnBeginDocument(startPage, endPage);

244  void GetPageInfo

(

int

*minPage,

int

*maxPage,

int

*pageSelFrom,

int

*pageSelTo)

268

std::cout <<

"printing page "

<< pageNum << std::endl;

274

wxRect fitRect = GetLogicalPageMarginsRect(

m_page_setup

);

278

OffsetLogicalOrigin(xoff, yoff);

281  if

(ptr==

NULL

|| !ptr->IsOk())

283

std::cout <<

"DC is not Ok, interrupting printing"

<< std::endl;

293  const int

x1 = x0 + width;

294  const int

y1 = y0 + height;

299

std::cout <<

"printable area : ("

<< x0 <<

", "

<< y0 <<

") to (" 300

<< x1 <<

", "

<< y1 <<

")"

<< std::endl;

333

wxString

label

(

wxT

(

"This is page #"

) );

335

dc.SetTextBackground( wxColour(255,255,0) );

336

dc.SetTextForeground( wxColour(0,0,0) );

337

dc.DrawText(

label

, x0 + width/5, y0 + height - 50 );

const unsigned char * GetData(void) const

size_t GetWidth(void) const

size_t GetHeight(void) const

Shows a basic example of how to print stuff in wx.

int m_margin_left

margins, in millimeters

void OnBeginPrinting()

Called when printing starts.

bool OnPrintPage(int pageNum)

called by wx everytime it's time to render a specific page onto the printing device context

float m_units_per_cm

we'll use this to determine the coordinate system; it describes the number of units per centimeter (i...

bool performPageSetup(const bool showPageSetupDialog)

shows the page setup dialog, OR sets up defaults

bool HasPage(int pageNum)

called by wx to know what pages this document has

int m_coord_system_height

wxPaperSize m_paper_type

the type of paper (letter, A4, etc...)

void GetPageInfo(int *minPage, int *maxPage, int *pageSelFrom, int *pageSelTo)

wx will call this to know how many pages can be printed

int m_coord_system_width

will contain the dimensions of the coordinate system, once it's calculated.

void OnEndPrinting()

Called when printing is done.

CPrintHanderWx(CRef< CImage > img, int page_amount, wxString title, float units_per_cm)

wxPageSetupDialogData m_page_setup

bool OnBeginDocument(int startPage, int endPage)

Called when starting to print a document.

wxPrintData getPrintData()

returns the data obtained from the page setup dialog (or the defaults, if dialog was not shown)

int m_page_amount

number of pages we want to print.

void SetImage(CRef< CImage > img)

wxPrintOrientation m_orient

horizontal or vertical

int GetPrintOffsetY() const

int GetTargetImageHeight() const

virtual wxPageSetupDialogData & GetPageSetupDialogData()

Required as a subclass of wxPageSetupDialogBase.

int GetDrawAreaWidth() const

int GetTargetImageWidth() const

int GetDrawAreaHeight() const

int GetPrintOffsetX() const

Include a standard set of the NCBI C++ Toolkit most basic headers.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static const char label[]

Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.

static const int brush_size


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4