]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/html/htmprint.h
cleanups, proper event handling/cleanup
[wxWidgets.git] / include / wx / html / htmprint.h
index 1ebf5a728a6fbb21fb77d7f75e5581add5cea116..393e4da0e3311ef194951f873f2b79a6c73901fe 100644 (file)
@@ -59,6 +59,12 @@ public:
     // 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; use either specified or default font
+    void SetStandardFonts(int size = -1,
+                          const wxString& normal_face = wxEmptyString,
+                          const wxString& fixed_face = wxEmptyString);
+
     // [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
@@ -106,7 +112,7 @@ enum {
 
 //--------------------------------------------------------------------------------
 // wxHtmlPrintout
-//                  This class is derived from standard wxWindows printout class
+//                  This class is derived from standard wxWidgets printout class
 //                  and is used to print HTML documents.
 //--------------------------------------------------------------------------------
 
@@ -142,6 +148,12 @@ public:
     // 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; use either specified or default font
+    void SetStandardFonts(int size = -1,
+                          const wxString& normal_face = wxEmptyString,
+                          const wxString& fixed_face = wxEmptyString);
+
     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
@@ -237,6 +249,12 @@ public:
     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)
 
+    // Sets font sizes to be relative to the given size or the system
+    // default size; use either specified or default font
+    void SetStandardFonts(int size = -1,
+                          const wxString& normal_face = wxEmptyString,
+                          const wxString& fixed_face = wxEmptyString);
+    
     wxPrintData *GetPrintData();
     wxPageSetupDialogData *GetPageSetupData() {return m_PageSetupData;}
             // return page setting data objects. 
@@ -254,6 +272,14 @@ private:
     int m_FontsSizesArr[7];
     int *m_FontsSizes;
     wxString m_FontFaceFixed, m_FontFaceNormal;
+
+    enum FontMode
+    {
+        FontMode_Explicit,
+        FontMode_Standard
+    };
+    FontMode m_fontMode;
+    
     wxString m_Headers[2], m_Footers[2];
     wxWindow *m_ParentWindow;