File: printdlg.h

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (125 lines) | stat: -rw-r--r-- 3,592 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/////////////////////////////////////////////////////////////////////////////
// Name:        printdlg.h
// Purpose:     interface of wxPrintDialog
// Author:      wxWidgets team
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

/**
    @class wxPrintDialog

    This class represents the print and print setup common dialogs.
    You may obtain a wxPrinterDC device context from a successfully dismissed
    print dialog.

    @library{wxcore}
    @category{printing}

    @see @ref overview_printing, @ref overview_cmndlg_print
*/
class wxPrintDialog : public wxObject
{
public:
    /**
        Constructor.

        Pass a parent window, and optionally a pointer to a block of print
        data, which will be copied to the print dialog's print data.

        @see wxPrintDialogData
    */
    wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
    wxPrintDialog(wxWindow *parent, wxPrintData* data);

    /**
        Destructor.

        If GetPrintDC() has not been called, the device context obtained by
        the dialog (if any) will be deleted.
    */
    virtual ~wxPrintDialog();

    /**
        Returns the device context created by the print dialog, if any.

        When this function has been called, the ownership of the device context
        is transferred to the application, so it must then be deleted
        explicitly.
    */
    virtual wxDC* GetPrintDC();

    /**
        Returns the @ref overview_printing_printdata "print dialog data" associated
        with the print dialog.
    */
    virtual wxPrintDialogData& GetPrintDialogData();

    /**
       Returns the @ref overview_printing_printdata "print data" associated
       with the print dialog.
    */
    virtual wxPrintData& GetPrintData();

    /**
        Shows the dialog, returning @c wxID_OK if the user pressed OK, and @c
        wxID_CANCEL otherwise.

        After this function is called, a device context may be retrievable using
        GetPrintDC().
    */
    virtual int ShowModal();
};



/**
    @class wxPageSetupDialog

    This class represents the page setup common dialog.

    The page setup dialog contains controls for paper size (letter, A4, A5 etc.),
    orientation (landscape or portrait), and, only under Windows currently,
    controls for setting left, top, right and bottom margin sizes in millimetres.

    The exact appearance of this dialog varies among the platforms as a native
    dialog is used when available (currently the case for all major platforms).

    When the dialog has been closed, you need to query the wxPageSetupDialogData
    object associated with the dialog.

    Note that the OK and Cancel buttons do not destroy the dialog; this must be done
    by the application.

    @library{wxcore}
    @category{printing}

    @see @ref overview_printing, wxPrintDialog, wxPageSetupDialogData
*/
class wxPageSetupDialog : public wxObject
{
public:
    /**
        Constructor.

        Pass a parent window, and optionally a pointer to a block of page
        setup data, which will be copied to the print dialog's internal data.
    */
    wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL);

    /**
        Destructor.
    */
    virtual ~wxPageSetupDialog();

    /**
        Returns the wxPageSetupDialogData object associated with the dialog.
    */
    wxPageSetupDialogData& GetPageSetupData();

    /**
        Shows the dialog, returning @c wxID_OK if the user pressed OK, and
        @c wxID_CANCEL otherwise.
    */
    int ShowModal();
};