**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Windows.Forms / System.Windows.Forms / PrintPreviewControl.cs
blob32115b37c792b93fb3039de53f01f8aad21ffd5a
1 //
2 // System.Windows.Forms.PrintPreviewControl
3 //
4 // Author:
5 // stubbed out by Jaak Simm (jaaksimm@firm.ee)
6 // Dennis Hayes (dennish@Raytek.com)
7 //
8 // (C) Ximian, Inc., 2002
9 //
12 // Permission is hereby granted, free of charge, to any person obtaining
13 // a copy of this software and associated documentation files (the
14 // "Software"), to deal in the Software without restriction, including
15 // without limitation the rights to use, copy, modify, merge, publish,
16 // distribute, sublicense, and/or sell copies of the Software, and to
17 // permit persons to whom the Software is furnished to do so, subject to
18 // the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be
21 // included in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 using System.Drawing;
33 using System.Drawing.Printing;
34 using System.ComponentModel;
36 namespace System.Windows.Forms {
38 /// <summary>
39 /// The raw "preview" part of print previewing, without any dialogs or buttons. Most PrintPreviewControl objects are found on PrintPreviewDialog objects, but they do not have to be.
40 ///
41 /// </summary>
43 [MonoTODO]
44 public class PrintPreviewControl : Control {
46 #region Fields
47 bool autoZoom;
48 int columns;
49 PrintDocument document;
50 int rows;
51 int startPage;
52 bool useAntiAlias;
53 double zoom;
54 #endregion
56 #region Constructors
57 [MonoTODO]
58 public PrintPreviewControl()
60 autoZoom=true;
61 columns=1;
62 document=null;
63 rows=0;
64 startPage=0;
65 zoom=1.0;
67 #endregion
69 #region Properties
70 public bool AutoZoom {
71 get { return autoZoom; }
72 set { autoZoom=value; }
75 public int Columns {
76 get { return columns; }
77 set { columns=value; }
80 [MonoTODO]
81 protected override CreateParams CreateParams {
82 get {
83 CreateParams createParams = base.CreateParams;
85 createParams.ClassName = "PRINTPREVIEWCONTROL";
86 createParams.Style = (int) (
87 WindowStyles.WS_CHILD |
88 WindowStyles.WS_VISIBLE);
90 return createParams;
94 public PrintDocument Document {
95 get { return document; }
96 set { document=value; }
99 public int Rows {
100 get { return rows; }
101 set { rows=value; }
104 public int StartPage {
105 get { return startPage; }
106 set { startPage=value; }
109 [MonoTODO]
110 public override string Text {
111 get {
112 return base.Text;
114 set {
115 base.Text = value;
119 public bool UseAntiAlias {
120 get { return useAntiAlias; }
121 set { useAntiAlias=value; }
124 public double Zoom {
125 get { return zoom; }
126 set { zoom=value; }
128 #endregion
130 #region Methods
131 [MonoTODO]
132 public void InvalidatePreview()
134 //FIXME:
137 [MonoTODO]
138 protected override void OnPaint(PaintEventArgs pevent)
140 //FIXME:
141 base.OnPaint(pevent);
144 [MonoTODO]
145 protected override void OnResize(EventArgs eventargs)
147 //FIXME:
148 base.OnResize(eventargs);
151 [MonoTODO]
152 protected virtual void OnStartPageChanged(EventArgs e)
154 //FIXME:
157 [MonoTODO]
158 public override void ResetBackColor()
160 //FIXME:
161 base.ResetBackColor();
164 [MonoTODO]
165 public override void ResetForeColor()
167 //FIXME:
168 base.ResetForeColor();
171 [MonoTODO]
172 protected override void WndProc(ref Message m)
174 //FIXME:
175 base.WndProc(ref m);
177 #endregion
179 #region Events
180 [MonoTODO]
181 public event EventHandler StartPageChanged;
182 #endregion