int GetCharHeight();
int GetCharWidth();
wxHtmlWindow* GetWindow();
- //void SetFonts(wxString normal_face, wxString fixed_face, int *LIST);
%addmethods {
- void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes) {
- int* temp = int_LIST_helper(sizes);
- if (temp) {
- self->SetFonts(normal_face, fixed_face, temp);
+ void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
+ int* temp = NULL;
+ if (sizes) temp = int_LIST_helper(sizes);
+ self->SetFonts(normal_face, fixed_face, temp);
+ if (temp)
delete [] temp;
- }
}
}
// Return value : same as SetPage
bool LoadPage(const wxString& location);
+ // TODO: (accept a string, convert to filename)
+ // Loads HTML page from file
+ // bool LoadFile(const wxFileName& filename);
+
// Append to current page
bool AppendToPage(const wxString& source);
// Sets fonts to be used when displaying HTML page.
%addmethods {
- void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes) {
- int* temp = int_LIST_helper(sizes);
- if (temp) {
- self->SetFonts(normal_face, fixed_face, temp);
+ void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
+ int* temp = NULL;
+ if (sizes) temp = int_LIST_helper(sizes);
+ self->SetFonts(normal_face, fixed_face, temp);
+ if (temp)
delete [] temp;
- }
}
}
void SetHtmlText(const wxString& html,
const wxString& basepath = wxPyEmptyString,
bool isdir = TRUE);
+ %addmethods {
+ void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
+ int* temp = NULL;
+ if (sizes) temp = int_LIST_helper(sizes);
+ self->SetFonts(normal_face, fixed_face, temp);
+ if (temp)
+ delete [] temp;
+ }
+ }
int Render(int x, int y, int from = 0, int dont_render = FALSE);
int GetTotalHeight();
// returns total height of the html document
void SetHtmlFile(const wxString &htmlfile);
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
+ %addmethods {
+ void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
+ int* temp = NULL;
+ if (sizes) temp = int_LIST_helper(sizes);
+ self->SetFonts(normal_face, fixed_face, temp);
+ if (temp)
+ delete [] temp;
+ }
+ }
void SetMargins(float top = 25.2, float bottom = 25.2,
float left = 25.2, float right = 25.2,
float spaces = 5);
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
+ %addmethods {
+ void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
+ int* temp = NULL;
+ if (sizes) temp = int_LIST_helper(sizes);
+ self->SetFonts(normal_face, fixed_face, temp);
+ if (temp)
+ delete [] temp;
+ }
+ }
+
wxPrintData *GetPrintData() {return m_PrintData;}
wxPageSetupDialogData *GetPageSetupData() {return m_PageSetupData;}