2006-1-10 Jonathan Chambers <jonathan.chambers@ansys.com>
authorJonathan Chambers <joncham@gmail.com>
Tue, 10 Jan 2006 04:46:55 +0000 (04:46 -0000)
committerJonathan Chambers <joncham@gmail.com>
Tue, 10 Jan 2006 04:46:55 +0000 (04:46 -0000)
* System.Windows.Forms.dll.sources: Add PrintPreviewDialog and PrintPreviewControl

svn path=/trunk/mcs/; revision=55283

mcs/class/Managed.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/PrintPreviewControl.cs [new file with mode: 0755]
mcs/class/Managed.Windows.Forms/System.Windows.Forms/PrintPreviewDialog.cs [new file with mode: 0755]

index fd36324c25c435ed57da9e5c6de316a061918ee3..e5ce0fc988000e17957c13141bc224f85d17ee84 100644 (file)
@@ -1,3 +1,7 @@
+2006-1-10  Jonathan Chambers  <jonathan.chambers@ansys.com>
+
+       * System.Windows.Forms.dll.sources: Add PrintPreviewDialog and PrintPreviewControl
+
 2006-1-10  Jonathan Chambers  <jonathan.chambers@ansys.com>
 
        * System.Windows.Forms.dll.sources: Add PrintControllerWithStatusDialog
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PrintPreviewControl.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PrintPreviewControl.cs
new file mode 100755 (executable)
index 0000000..8825ce0
--- /dev/null
@@ -0,0 +1,135 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2006 Novell, Inc.
+//
+// Authors:
+//     Jonathan Chambers (jonathan.chambers@ansys.com)
+//
+
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Design;
+using System.ComponentModel.Design.Serialization;
+using System.Collections;
+using System.Diagnostics;
+using System.Drawing;
+using System.Drawing.Printing;
+using System.Reflection;
+
+namespace System.Windows.Forms {
+
+       public class PrintPreviewControl : Control {
+               #region Local variables
+               private bool autozoom;
+               private int columns;
+               private PrintDocument document;
+               private int rows;
+               private int startPage;
+               private bool useAntiAlias;
+               private double zoom;
+               #endregion // Local variables
+
+               #region Public Constructors
+               public PrintPreviewControl() {
+                       autozoom = true;
+                       columns = 1;
+                       rows = 0;
+                       startPage = 0;
+               }
+               #endregion // Public Constructors
+
+               
+               #region Public Instance Properties
+               public bool AutoZoom {
+                       get { return autozoom; }
+                       set { autozoom = value; }
+               }
+               public int Columns {
+                       get { return columns; }
+                       set { columns = value; }
+               }
+               public PrintDocument Document {
+                       get { return document; }
+                       set { document = value; }
+               }
+               public int Rows {
+                       get { return rows; }
+                       set { rows = value; }
+               }
+               public int StartPage {
+                       get { return startPage; }
+                       set { startPage = value; }
+               }
+               public bool UseAntiAlias {
+                       get { return useAntiAlias; }
+                       set { useAntiAlias = value; }
+               }
+               public double Zoom {
+                       get { return zoom; }
+                       set { zoom = value; }
+               }
+               #endregion // Public Instance Properties
+
+               
+               #region Public Instance Methods
+               public void InvalidatePreview() {
+               }
+               public override void ResetBackColor() {
+                       base.ResetBackColor();
+               }
+
+               public override void ResetForeColor() {\r
+                       base.ResetForeColor ();\r
+               }
+               #endregion // Public Instance Methods
+
+               #region Protected Instance Properties
+               protected override CreateParams CreateParams {\r
+                       get {\r
+                               return base.CreateParams;\r
+                       }\r
+               }\r
+
+               #endregion // Protected Instance Methods
+
+               #region Protected Instance Properties
+\r
+               protected override void OnPaint(PaintEventArgs e) {\r
+                       base.OnPaint (e);\r
+               }\r
+\r
+               protected override void OnResize(EventArgs e) {\r
+                       base.OnResize (e);\r
+               }\r
+\r
+               protected virtual void OnStartPageChanged(EventArgs e) {\r
+                       if (StartPageChanged != null)\r
+                               StartPageChanged(this, e);\r
+               }\r
+\r
+               protected override void WndProc(ref Message m) {\r
+                       base.WndProc (ref m);\r
+               }\r
+
+               #endregion // Protected Instance Methods
+
+               public event EventHandler StartPageChanged;
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PrintPreviewDialog.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PrintPreviewDialog.cs
new file mode 100755 (executable)
index 0000000..f0d849a
--- /dev/null
@@ -0,0 +1,76 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2006 Novell, Inc.
+//
+// Authors:
+//     Jonathan Chambers (jonathan.chambers@ansys.com)
+//
+
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Design;
+using System.ComponentModel.Design.Serialization;
+using System.Collections;
+using System.Diagnostics;
+using System.Drawing;
+using System.Drawing.Printing;
+using System.Reflection;
+
+namespace System.Windows.Forms {
+
+       public class PrintPreviewDialog : Form {
+               #region Local variables
+               PrintPreviewControl printPreview;
+               #endregion // Local variables
+
+               #region Public Constructors
+               public PrintPreviewDialog() {
+               }
+               #endregion // Public Constructors
+
+               #region Public Instance Properties
+               public PrintDocument Document {
+                       get { return printPreview.Document; }
+                       set { printPreview.Document = value; }
+               }
+               public override ISite Site {\r
+                       get {\r
+                               return base.Site;\r
+                       }\r
+                       set {\r
+                               base.Site = value;\r
+                       }\r
+               }
+               public bool UseAntiAlias {
+                       get { return printPreview.UseAntiAlias; }
+                       set { printPreview.UseAntiAlias = value; }
+               }\r
+
+               #endregion // Public Instance Properties
+
+               #region Protected Instance Properties
+               protected override void CreateHandle() {\r
+                       base.CreateHandle ();\r
+               }\r
+\r
+
+               #endregion // Protected Instance Methods
+       }
+}
\ No newline at end of file