]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_printfw.i
get rid of \\ macros and change See Also -> See also
[wxWidgets.git] / wxPython / src / _printfw.i
index fd6a356b947cb7cc25335b98316fb591fefe6e29..39af033f2de97996a8e6ab68b9f9090132975baf 100644 (file)
@@ -36,11 +36,34 @@ enum wxPrintMode
     wxPRINT_MODE_STREAM = 4     // Send postscript data into a stream 
 };
 
+enum wxPrintBin
+{
+    wxPRINTBIN_DEFAULT,
+
+    wxPRINTBIN_ONLYONE,
+    wxPRINTBIN_LOWER,
+    wxPRINTBIN_MIDDLE,
+    wxPRINTBIN_MANUAL,
+    wxPRINTBIN_ENVELOPE,
+    wxPRINTBIN_ENVMANUAL,
+    wxPRINTBIN_AUTO,
+    wxPRINTBIN_TRACTOR,
+    wxPRINTBIN_SMALLFMT,
+    wxPRINTBIN_LARGEFMT,
+    wxPRINTBIN_LARGECAPACITY,
+    wxPRINTBIN_CASSETTE,
+    wxPRINTBIN_FORMSOURCE,
+
+    wxPRINTBIN_USER,
+};
 
 
 class wxPrintData : public wxObject {
 public:
+    %nokwargs wxPrintData;
     wxPrintData();
+    wxPrintData(const wxPrintData& data);  // for making copies
+    
     ~wxPrintData();
 
     int GetNoCopies();
@@ -56,7 +79,8 @@ public:
     const wxSize& GetPaperSize();
 
     int GetQuality();
-
+    wxPrintBin GetBin();
+    
     void SetNoCopies(int v);
     void SetCollate(bool flag);
     void SetOrientation(int orient);
@@ -67,7 +91,7 @@ public:
     void SetPaperId(wxPaperSize sizeId);
     void SetPaperSize(const wxSize& sz);
     void SetQuality(int quality);
-
+    void SetBin(wxPrintBin bin);
     // PostScript-specific data
     const wxString& GetPrinterCommand();
     const wxString& GetPrinterOptions();
@@ -103,7 +127,9 @@ public:
 
 class wxPageSetupDialogData : public wxObject {
 public:
+    %nokwargs wxPageSetupDialogData;
     wxPageSetupDialogData();
+    wxPageSetupDialogData(const wxPageSetupDialogData& data);  // for making copies
     ~wxPageSetupDialogData();
 
     void EnableHelp(bool flag);
@@ -149,6 +175,8 @@ public:
 
 
 
+MustHaveApp(wxPageSetupDialog);
+
 class wxPageSetupDialog : public wxDialog {
 public:
     %pythonAppend wxPageSetupDialog         "self._setOORInfo(self)"
@@ -166,7 +194,7 @@ class wxPrintDialogData : public wxObject {
 public:
     %nokwargs wxPrintDialogData;
     wxPrintDialogData();
-    wxPrintDialogData(const wxPrintData& printData);
+    wxPrintDialogData(const wxPrintData& printData);  // for making copies
     ~wxPrintDialogData();
 
     int GetFromPage() const;
@@ -217,6 +245,8 @@ public:
 };
 
 
+MustHaveApp(wxPrintDialog);
+
 class wxPrintDialog : public wxDialog {
 public:
     %pythonAppend wxPrintDialog         "self._setOORInfo(self)"
@@ -243,6 +273,8 @@ enum wxPrinterError
 };
 
 
+MustHaveApp(wxPrinter);
+
 class wxPrinter : public wxObject {
 public:
     wxPrinter(wxPrintDialogData* data = NULL);
@@ -270,7 +302,7 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p
     bool hadErr = False;
     bool found;
 
-    wxPyBeginBlockThreads();
+    bool blocked = wxPyBeginBlockThreads();
     if ((found = wxPyCBH_findCallback(m_myInst, "GetPageInfo"))) {
         PyObject* result = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()"));
         if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) {
@@ -301,7 +333,7 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p
         }
         Py_DECREF(result);
     }
-    wxPyEndBlockThreads();
+    wxPyEndBlockThreads(blocked);
     if (! found)
         wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
 }
@@ -323,6 +355,8 @@ IMP_PYCALLBACK_BOOL_INT(wxPyPrintout, wxPrintout, HasPage);
 %}
 
 
+MustHaveApp(wxPyPrintout);
+
 // Now define the custom class for SWIGging
 %name(Printout) class wxPyPrintout  : public wxObject {
 public:
@@ -377,6 +411,8 @@ public:
 
 
 
+MustHaveApp(wxPreviewCanvas);
+
 class wxPreviewCanvas: public wxScrolledWindow
 {
 public:
@@ -391,6 +427,8 @@ public:
 };
 
 
+MustHaveApp(wxPreviewFrame);
+
 class wxPreviewFrame : public wxFrame {
 public:
     %pythonAppend wxPreviewFrame   "self._setOORInfo(self)"
@@ -430,6 +468,8 @@ enum {
     wxID_PREVIEW_GOTO
 };
 
+MustHaveApp(wxPreviewControlBar);
+
 class wxPreviewControlBar: public wxPanel
 {
 public:
@@ -458,6 +498,8 @@ public:
 
 //---------------------------------------------------------------------------
 
+MustHaveApp(wxPrintPreview);
+
 class wxPrintPreview : public wxObject {
 public:
     %nokwargs wxPrintPreview;
@@ -527,15 +569,15 @@ public:
     bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) {                           \
         bool rval=False;                                                        \
         bool found;                                                             \
-        wxPyBeginBlockThreads();                                                \
+        bool blocked = wxPyBeginBlockThreads();                                                \
         if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) {                \
-            PyObject* win = wxPyMake_wxObject(a);                               \
-            PyObject* dc  = wxPyMake_wxObject(&b);                              \
+            PyObject* win = wxPyMake_wxObject(a,false);                               \
+            PyObject* dc  = wxPyMake_wxObject(&b,false);                              \
             rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", win, dc));\
             Py_DECREF(win);                                                     \
             Py_DECREF(dc);                                                      \
         }                                                                       \
-        wxPyEndBlockThreads();                                                  \
+        wxPyEndBlockThreads(blocked);                                                  \
         if (! found)                                                            \
             rval = PCLASS::CBNAME(a, b);                                        \
         return rval;                                                            \
@@ -592,6 +634,8 @@ IMP_PYCALLBACK_VOID_        (wxPyPrintPreview, wxPrintPreview, DetermineScaling)
 %}
 
 
+MustHaveApp(wxPyPrintPreview);
+
 class wxPyPrintPreview : public wxPrintPreview
 {
 public:
@@ -650,6 +694,8 @@ IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, CreateControlBar);
 %}
 
 
+MustHaveApp(wxPyPreviewFrame);
+
 class wxPyPreviewFrame : public wxPreviewFrame
 {
 public:
@@ -704,6 +750,8 @@ IMP_PYCALLBACK_VOID_INT(wxPyPreviewControlBar, wxPreviewControlBar, SetZoomContr
 %}
 
 
+MustHaveApp(wxPyPreviewControlBar);
+
 class wxPyPreviewControlBar : public wxPreviewControlBar
 {
 public: