/src/wrappers/gtk/library/gtk_page_setup_unix_dialog.e

http://github.com/tybor/Liberty · Specman e · 142 lines · 90 code · 23 blank · 29 comment · 6 complexity · 7b4832f0226728f42d313586c5fd98d9 MD5 · raw file

  1. indexing
  2. description: "A page setup dialog."
  3. copyright: "[
  4. Copyright (C) 2007 Paolo Redaelli, GTK+ team
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hopeOA that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. wrapped_version: "2.10.6"
  19. class GTK_PAGE_SETUP_UNIX_DIALOG
  20. -- GtkPageSetupUnixDialog implements a page setup dialog for
  21. -- platforms which don't provide a native page setup dialog, like
  22. -- Unix. It can be used very much like any other GTK+ dialog, at
  23. -- the cost of the portability offered by the high-level printing
  24. -- API
  25. -- Printing support was added in GTK+ 2.10.
  26. inherit
  27. GTK_DIALOG
  28. rename
  29. make as make_dialog
  30. redefine
  31. struct_size
  32. end
  33. -- GtkPageSetupUnixDialog implements AtkImplementorIface.
  34. creation make, from_external_pointer
  35. feature {} -- Creation
  36. make (a_title: STRING; a_parent: GTK_WINDOW) is
  37. -- Creates a new page setup dialog.
  38. -- `a_title': the title of the dialog, or Void.
  39. -- `a_parent': transient parent of the dialog, or Void
  40. do
  41. from_external_pointer(gtk_page_setup_unix_dialog_new
  42. (null_or_string(a_title),
  43. null_or(a_parent)))
  44. end
  45. set_page_setup (a_page_setup: GTK_PAGE_SETUP) is
  46. -- Sets the GtkPageSetup from which the page setup dialog
  47. -- takes its values.
  48. require setup_not_void: a_page_setup/=Void
  49. do
  50. gtk_page_setup_unix_dialog_set_page_setup(handle,a_page_setup.handle)
  51. end
  52. page_setup: GTK_PAGE_SETUP is
  53. -- the current page setup
  54. local p: POINTER; factory: G_OBJECT_EXPANDED_FACTORY[GTK_PAGE_SETUP]
  55. do
  56. p := gtk_page_setup_unix_dialog_get_page_setup(handle)
  57. if p.is_not_null then
  58. Result:=factory.existant_wrapper(p)
  59. if Result=Void then
  60. create Result.from_external_pointer(p)
  61. end
  62. end
  63. end
  64. set_print_settings (some_settings: GTK_PRINT_SETTINGS) is
  65. --Sets the GtkPrintSettings from which the page setup dialog takes its
  66. require settings_not_void: some_settings/= Void
  67. do
  68. gtk_page_setup_unix_dialog_set_print_settings
  69. (handle,some_settings.handle)
  70. ensure set: print_settings = some_settings
  71. end
  72. print_settings: GTK_PRINT_SETTINGS is
  73. -- The current print settings
  74. local p: POINTER; r: G_OBJECT_EXPANDED_FACTORY[GTK_PRINT_SETTINGS]
  75. do
  76. p:=gtk_page_setup_unix_dialog_get_print_settings(handle)
  77. if p.is_not_null then
  78. Result:=r.existant_wrapper(p)
  79. if Result=Void then
  80. create Result.from_external_pointer(p)
  81. end
  82. end
  83. end
  84. feature {} -- External calls
  85. -- #include <gtk/gtkpagesetupunixdialog.h>
  86. gtk_page_setup_unix_dialog_new (a_title, a_parent: POINTER): POINTER is
  87. -- GtkWidget* gtk_page_setup_unix_dialog_new (const gchar
  88. -- *title, GtkWindow *parent);
  89. external "C use <gtk/gtkpagesetupunixdialog.h>"
  90. end
  91. gtk_page_setup_unix_dialog_set_page_setup (a_dialog, a_page_setup: POINTER) is
  92. -- void gtk_page_setup_unix_dialog_set_page_setup
  93. -- (GtkPageSetupUnixDialog *dialog, GtkPageSetup
  94. -- *page_setup);
  95. external "C use <gtk/gtkpagesetupunixdialog.h>"
  96. end
  97. gtk_page_setup_unix_dialog_get_page_setup (a_dialog: POINTER): POINTER is
  98. -- GtkPageSetup* gtk_page_setup_unix_dialog_get_page_setup
  99. -- (GtkPageSetupUnixDialog *dialog);
  100. external "C use <gtk/gtkpagesetupunixdialog.h>"
  101. end
  102. gtk_page_setup_unix_dialog_set_print_settings (a_dialog, a_print_settings: POINTER) is
  103. -- void gtk_page_setup_unix_dialog_set_print_settings
  104. -- (GtkPageSetupUnixDialog *dialog, GtkPrintSettings
  105. -- *print_settings);
  106. external "C use <gtk/gtkpagesetupunixdialog.h>"
  107. end
  108. gtk_page_setup_unix_dialog_get_print_settings (a_dialog: POINTER): POINTER is
  109. -- GtkPrintSettings*
  110. -- gtk_page_setup_unix_dialog_get_print_settings
  111. -- (GtkPageSetupUnixDialog *dialog);
  112. external "C use <gtk/gtkpagesetupunixdialog.h>"
  113. end
  114. feature -- size
  115. struct_size: INTEGER is
  116. external "C inline use <gtk/gtkpagesetupunixdialog.h>"
  117. alias "sizeof(GtkPageSetupUnixDialog)"
  118. end
  119. end -- class GTK_PAGE_SETUP_UNIX_DIALOG