PrintDocument.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. //
  2. // System.Drawing.PrintDocument.cs
  3. //
  4. // Author:
  5. // Dennis Hayes ([email protected])
  6. //
  7. // (C) 2002 Ximian, Inc
  8. //
  9. using System;
  10. namespace System.Drawing.Printing {
  11. /// <summary>
  12. /// Summary description for PrintDocument.
  13. /// </summary>
  14. public class PrintDocument{// : Component {
  15. private PageSettings defaultpagesettings;
  16. private string documentname;
  17. private bool originAtMargins; // .NET V1.1 Beta
  18. //[MonoTODO]
  19. public PrintDocument() {
  20. //FIXME: do we need to init defaultpagesetting, or does pagesettings do that?
  21. documentname = "Document"; //offical default.
  22. }
  23. public PageSettings DefaultPageSettings{
  24. get{
  25. return defaultpagesettings;
  26. }
  27. set{
  28. defaultpagesettings = value;
  29. }
  30. }
  31. /// <summary>
  32. /// Name of the document, not the file!
  33. /// </summary>
  34. public string DocumentName{
  35. get{
  36. return documentname;
  37. }
  38. set{
  39. documentname = value;
  40. }
  41. }
  42. [MonoTODO]
  43. public PrintController PrintController{
  44. get{
  45. throw new NotImplementedException ();
  46. }
  47. set{
  48. throw new NotImplementedException ();
  49. }
  50. }
  51. [MonoTODO]
  52. public PrinterSettings PrinterSettings{
  53. get{
  54. throw new NotImplementedException ();
  55. }
  56. set{
  57. throw new NotImplementedException ();
  58. }
  59. }
  60. [MonoTODO]
  61. public bool OriginAtMargins{// .NET V1.1 Beta
  62. get{
  63. return originAtMargins;
  64. }
  65. set{
  66. originAtMargins = value;
  67. }
  68. }
  69. public void Print(){
  70. throw new NotImplementedException ();
  71. }
  72. public override string ToString(){
  73. throw new NotImplementedException ();
  74. }
  75. [MonoTODO]
  76. protected virtual void OnBeginPrint(PrintEventArgs e){
  77. //fire the event
  78. }
  79. [MonoTODO]
  80. protected virtual void OnEndPrint(PrintEventArgs e){
  81. //fire the event
  82. }
  83. [MonoTODO]
  84. protected virtual void OnPrintPage(PrintEventArgs e){
  85. //fire the event
  86. }
  87. [MonoTODO]
  88. protected virtual void OnQueryPageSettings(PrintEventArgs e){
  89. //fire the event
  90. }
  91. [MonoTODO]
  92. protected virtual void OnBeginPaint(PrintEventArgs e){
  93. //fire the event
  94. }
  95. public event PrintEventHandler BeginPrint;
  96. public event PrintEventHandler EndPrint;
  97. public event PrintEventHandler PrintPage;
  98. public event PrintEventHandler QuerypageSettings;
  99. }
  100. }