void SetFonts(wxString normal_face, wxString fixed_face,
const int *sizes = NULL);
+ // Sets font sizes to be relative to the given size or the system default size
+ void NormalizeFontSizes(int size=-1);
+
// Sets space between text and window borders.
void SetBorders(int b) {m_Borders = b;}
// 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);
+ // Sets font sizes to be relative to the given size or the system default size
+ void NormalizeFontSizes(int size=-1);
+
// [x,y] is position of upper-left corner of printing rectangle (see SetSize)
// from is y-coordinate of the very first visible cell
// to is y-coordinate of the next following page break, if any
// 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);
+ // Sets font sizes to be relative to the given size or the system default size
+ void NormalizeFontSizes(int size=-1);
+
void SetMargins(float top = 25.2, float bottom = 25.2, float left = 25.2, float right = 25.2,
float spaces = 5);
// sets margins in milimeters. Defaults to 1 inch for margins and 0.5cm for space
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = 0);
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used)
+ void NormalizeFontSizes(int size=-1);
+ // Sets font sizes to be relative to the given size or the system default size
+
wxPrintData *GetPrintData();
wxPageSetupDialogData *GetPageSetupData() {return m_PageSetupData;}
// return page setting data objects.
// 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);
+ // Sets font sizes to be relative to the given size or the system default size
+ void NormalizeFontSizes(int size=-1);
+
// Adds tags module. see wxHtmlTagsModule for details.
static void AddModule(wxHtmlTagsModule *module);
#include "wx/dataobj.h"
#include "wx/timer.h"
#include "wx/dcmemory.h"
+#include "wx/settings.h"
#include "wx/arrimpl.cpp"
#include "wx/listimpl.cpp"
-
#if wxUSE_CLIPBOARD
// ----------------------------------------------------------------------------
// wxHtmlWinAutoScrollTimer: the timer used to generate a stream of scroll
if (!op.IsEmpty()) LoadPage(op);
}
+void wxHtmlWindow::NormalizeFontSizes(int size)
+{
+ int f_sizes[7];
+ if (size == -1)
+ size = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize();
+
+ f_sizes[0] = int(size * 0.6);
+ f_sizes[1] = int(size * 0.8);
+ f_sizes[2] = size;
+ f_sizes[3] = int(size * 1.2);
+ f_sizes[4] = int(size * 1.4);
+ f_sizes[5] = int(size * 1.6);
+ f_sizes[6] = int(size * 1.8);
+
+ SetFonts(wxEmptyString, wxEmptyString, f_sizes);
+}
bool wxHtmlWindow::SetPage(const wxString& source)
#include "wx/wxhtml.h"
#include "wx/wfstream.h"
#include "wx/module.h"
+#include "wx/settings.h"
//--------------------------------------------------------------------------------
}
+void wxHtmlDCRenderer::NormalizeFontSizes(int size)
+{
+ int f_sizes[7];
+ if (size == -1)
+ size = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize();
+
+ f_sizes[0] = int(size * 0.6);
+ f_sizes[1] = int(size * 0.8);
+ f_sizes[2] = size;
+ f_sizes[3] = int(size * 1.2);
+ f_sizes[4] = int(size * 1.4);
+ f_sizes[5] = int(size * 1.6);
+ f_sizes[6] = int(size * 1.8);
+
+ SetFonts(wxEmptyString, wxEmptyString, f_sizes);
+}
+
+
int wxHtmlDCRenderer::Render(int x, int y, int from, int dont_render, int to, int *known_pagebreaks, int number_of_pages)
{
int pbreak, hght;
}
+void wxHtmlPrintout::NormalizeFontSizes(int size)
+{
+ int f_sizes[7];
+ if (size == -1)
+ size = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize();
+
+ f_sizes[0] = int(size * 0.6);
+ f_sizes[1] = int(size * 0.8);
+ f_sizes[2] = size;
+ f_sizes[3] = int(size * 1.2);
+ f_sizes[4] = int(size * 1.4);
+ f_sizes[5] = int(size * 1.6);
+ f_sizes[6] = int(size * 1.8);
+
+ SetFonts(wxEmptyString, wxEmptyString, f_sizes);
+}
+
+
//----------------------------------------------------------------------------
// wxHtmlEasyPrinting
m_FontsSizes = NULL;
}
+void wxHtmlEasyPrinting::NormalizeFontSizes(int size)
+{
+ int f_sizes[7];
+ if (size == -1)
+ size = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize();
+
+ f_sizes[0] = int(size * 0.6);
+ f_sizes[1] = int(size * 0.8);
+ f_sizes[2] = size;
+ f_sizes[3] = int(size * 1.2);
+ f_sizes[4] = int(size * 1.4);
+ f_sizes[5] = int(size * 1.6);
+ f_sizes[6] = int(size * 1.8);
+
+ SetFonts(wxEmptyString, wxEmptyString, f_sizes);
+}
+
wxHtmlPrintout *wxHtmlEasyPrinting::CreatePrintout()
{
}
}
+void wxHtmlWinParser::NormalizeFontSizes(int size)
+{
+ int f_sizes[7];
+ if (size == -1)
+ size = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize();
+
+ f_sizes[0] = int(size * 0.6);
+ f_sizes[1] = int(size * 0.8);
+ f_sizes[2] = size;
+ f_sizes[3] = int(size * 1.2);
+ f_sizes[4] = int(size * 1.4);
+ f_sizes[5] = int(size * 1.6);
+ f_sizes[6] = int(size * 1.8);
+
+ SetFonts(wxEmptyString, wxEmptyString, f_sizes);
+}
+
void wxHtmlWinParser::InitParser(const wxString& source)
{
wxHtmlParser::InitParser(source);
}
}
+ // Sets font sizes to be relative to the given size or the system default size
+ void NormalizeFontSizes(int size=-1);
+
wxHtmlContainerCell* GetContainer();
wxHtmlContainerCell* OpenContainer();
wxHtmlContainerCell *SetContainer(wxHtmlContainerCell *c);
}
}
+ // Sets font sizes to be relative to the given size or the system default size
+ void NormalizeFontSizes(int size=-1);
+
DocDeclStr(
void, SetTitle(const wxString& title),
"", "");
delete [] temp;
}
}
+
+ // Sets font sizes to be relative to the given size or the system default size
+ void NormalizeFontSizes(int size=-1);
+
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* choices=NULL, int LCOUNT = 0
delete [] temp;
}
}
+
+ // Sets font sizes to be relative to the given size or the system default size
+ void NormalizeFontSizes(int size=-1);
+
void SetMargins(float top = 25.2, float bottom = 25.2,
float left = 25.2, float right = 25.2,
float spaces = 5);
}
}
+ // Sets font sizes to be relative to the given size or the system default size
+ void NormalizeFontSizes(int size=-1);
+
wxPrintData *GetPrintData() {return m_PrintData;}
wxPageSetupDialogData *GetPageSetupData() {return m_PageSetupData;}