Some updates for wxHtml classes, and other tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -647,6 +647,8 @@ if wxPlatform == "__WXGTK__":
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# On MSW add the directory where the wxWindows catalogs were installed
|
||||||
|
# to the default catalog path.
|
||||||
if wxPlatform == "__WXMSW__":
|
if wxPlatform == "__WXMSW__":
|
||||||
import os
|
import os
|
||||||
localedir = os.path.join(os.path.split(__file__)[0], "locale")
|
localedir = os.path.join(os.path.split(__file__)[0], "locale")
|
||||||
|
@@ -187,14 +187,14 @@ public:
|
|||||||
int GetCharHeight();
|
int GetCharHeight();
|
||||||
int GetCharWidth();
|
int GetCharWidth();
|
||||||
wxHtmlWindow* GetWindow();
|
wxHtmlWindow* GetWindow();
|
||||||
//void SetFonts(wxString normal_face, wxString fixed_face, int *LIST);
|
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
|
||||||
%addmethods {
|
%addmethods {
|
||||||
void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes) {
|
void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
|
||||||
int* temp = int_LIST_helper(sizes);
|
int* temp = NULL;
|
||||||
if (temp) {
|
if (sizes) temp = int_LIST_helper(sizes);
|
||||||
self->SetFonts(normal_face, fixed_face, temp);
|
self->SetFonts(normal_face, fixed_face, temp);
|
||||||
|
if (temp)
|
||||||
delete [] temp;
|
delete [] temp;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -651,6 +651,9 @@ public:
|
|||||||
// Return value : same as SetPage
|
// Return value : same as SetPage
|
||||||
bool LoadPage(const wxString& location);
|
bool LoadPage(const wxString& location);
|
||||||
|
|
||||||
|
// Loads HTML page from file
|
||||||
|
//TODO bool LoadFile(const wxString& filename);
|
||||||
|
|
||||||
// Append to current page
|
// Append to current page
|
||||||
bool AppendToPage(const wxString& source);
|
bool AppendToPage(const wxString& source);
|
||||||
|
|
||||||
@@ -674,12 +677,12 @@ public:
|
|||||||
|
|
||||||
// Sets fonts to be used when displaying HTML page.
|
// Sets fonts to be used when displaying HTML page.
|
||||||
%addmethods {
|
%addmethods {
|
||||||
void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes) {
|
void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
|
||||||
int* temp = int_LIST_helper(sizes);
|
int* temp = NULL;
|
||||||
if (temp) {
|
if (sizes) temp = int_LIST_helper(sizes);
|
||||||
self->SetFonts(normal_face, fixed_face, temp);
|
self->SetFonts(normal_face, fixed_face, temp);
|
||||||
|
if (temp)
|
||||||
delete [] temp;
|
delete [] temp;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -741,6 +744,16 @@ public:
|
|||||||
void SetHtmlText(const wxString& html,
|
void SetHtmlText(const wxString& html,
|
||||||
const wxString& basepath = wxPyEmptyString,
|
const wxString& basepath = wxPyEmptyString,
|
||||||
bool isdir = TRUE);
|
bool isdir = TRUE);
|
||||||
|
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
|
||||||
|
%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 Render(int x, int y, int from = 0, int dont_render = FALSE);
|
||||||
int GetTotalHeight();
|
int GetTotalHeight();
|
||||||
// returns total height of the html document
|
// returns total height of the html document
|
||||||
@@ -765,6 +778,16 @@ public:
|
|||||||
void SetHtmlFile(const wxString &htmlfile);
|
void SetHtmlFile(const wxString &htmlfile);
|
||||||
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
|
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
|
||||||
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
|
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
|
||||||
|
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
|
||||||
|
%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,
|
void SetMargins(float top = 25.2, float bottom = 25.2,
|
||||||
float left = 25.2, float right = 25.2,
|
float left = 25.2, float right = 25.2,
|
||||||
float spaces = 5);
|
float spaces = 5);
|
||||||
|
Reference in New Issue
Block a user