// Author: Vaclav Slavik
// Created: 25/09/99
// RCS-ID: $Id$
-// Copyright: (c)
+// Copyright: (c) Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_HTMPRINT_H_
#define _WX_HTMPRINT_H_
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "htmprint.h"
-#endif
-
#include "wx/defs.h"
#if wxUSE_HTML & wxUSE_PRINTING_ARCHITECTURE
void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true);
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
- void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
+ void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL);
// Sets font sizes to be relative to the given size or the system
// default size; use either specified or default font
// set the same pagebreak twice.
//
// CAUTION! Render() changes DC's user scale and does NOT restore it!
- int Render(int x, int y, int from = 0, int dont_render = FALSE, int to = INT_MAX,
- int *known_pagebreaks = NULL, int number_of_pages = 0);
+ int Render(int x, int y, wxArrayInt& known_pagebreaks, int from = 0,
+ int dont_render = FALSE, int to = INT_MAX);
// returns total height of the html document
// (compare Render's return value with this)
// You can set different header/footer for odd and even pages
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
- void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
+ void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL);
// Sets font sizes to be relative to the given size or the system
// default size; use either specified or default font
private:
int m_NumPages;
- int m_PageBreaks[wxHTML_PRINT_MAX_PAGES];
+ //int m_PageBreaks[wxHTML_PRINT_MAX_PAGES];
+ wxArrayInt m_PageBreaks;
wxString m_Document, m_BasePath;
bool m_BasePathIsDir;
bool PrintText(const wxString &htmltext, const wxString& basepath = wxEmptyString);
// Print file / html-text w/o preview
- void PrinterSetup();
void PageSetup();
// pop up printer or page setup dialog
// pg is one of wxPAGE_ODD, wxPAGE_EVEN and wx_PAGE_ALL constants.
// You can set different header/footer for odd and even pages
- void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = 0);
+ void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = 0);
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used)
// Sets font sizes to be relative to the given size or the system