PrintDemo.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: PrintDemo.h /main/6 1996/05/09 03:40:22 drk $ */
  24. #include <Xm/XmAll.h>
  25. #include <Xm/Print.h>
  26. #include <Dt/Print.h>
  27. #include "AppSpecific.h"
  28. /*
  29. * ------------------------------------------------------------------------
  30. * Module: Print
  31. *
  32. */
  33. /*
  34. * app specific print data holder
  35. */
  36. typedef struct _AppPrintData
  37. {
  38. Widget print_dialog;
  39. Widget print_shell;
  40. Widget pr_button;
  41. Boolean print_only;
  42. DtPrintSetupData *print_data;
  43. AppObject* app_object;
  44. /* used during pagesetup callback logic */
  45. int printed_lines ;
  46. int total_lines ;
  47. short lines_per_page ;
  48. Widget ptext, pform;
  49. } AppPrintData;
  50. extern AppPrintData* AppPrintData_new();
  51. /*
  52. * Print module exported functions
  53. */
  54. extern void CreatePrintSetup(Widget parent, AppPrintData* p);
  55. extern void PrintMenuCB(Widget, XtPointer, XtPointer);
  56. extern void QuickPrintCB(Widget, XtPointer, XtPointer);
  57. /*
  58. * ------------------------------------------------------------------------
  59. * Module: Main
  60. *
  61. */
  62. extern void CloseProgramCB(Widget, XtPointer, XtPointer);
  63. /*
  64. * ------------------------------------------------------------------------
  65. * Module: MainWindow
  66. *
  67. */
  68. /*
  69. * MainWindow structure
  70. */
  71. typedef struct _MainWindow
  72. {
  73. Widget widget;
  74. Widget print_menu_button;
  75. Widget quick_print_button;
  76. Widget exit_button;
  77. } MainWindow;
  78. extern MainWindow* MainWindow_new(Widget parent);