type Gtk_Page_Setup_Record is new GObject_Record with null record;
type Gtk_Page_Setup is access all Gtk_Page_Setup_Record'Class;
procedure Gtk_New
( | Self | : out Gtk_Page_Setup); |
procedure Initialize
( | Self | : not null access Gtk_Page_Setup_Record'Class); |
function Gtk_Page_Setup_New return Gtk_Page_Setup;
procedure Gtk_New_From_File
( | Self | : out Gtk_Page_Setup; |
File_Name | : UTF8_String); |
procedure Initialize_From_File
( | Self | : not null access Gtk_Page_Setup_Record'Class; |
File_Name | : UTF8_String); |
function Gtk_Page_Setup_New_From_File
( | File_Name | : UTF8_String) return Gtk_Page_Setup; |
procedure Gtk_New_From_Key_File
( | Self | : out Gtk_Page_Setup; |
Key_File | : Glib.Key_File.G_Key_File; | |
Group_Name | : UTF8_String := ""); |
procedure Initialize_From_Key_File
( | Self | : not null access Gtk_Page_Setup_Record'Class; |
Key_File | : Glib.Key_File.G_Key_File; | |
Group_Name | : UTF8_String := ""); |
function Gtk_Page_Setup_New_From_Key_File
( | Key_File | : Glib.Key_File.G_Key_File; |
Group_Name | : UTF8_String := "") return Gtk_Page_Setup; |
function Get_Type return Glib.GType;
function Copy
( | Self | : not null access Gtk_Page_Setup_Record) return Gtk_Page_Setup; |
function Get_Bottom_Margin
( | Self | : not null access Gtk_Page_Setup_Record; |
Unit | : Gtk.Enums.Gtk_Unit) return Gdouble; |
procedure Set_Bottom_Margin
( | Self | : not null access Gtk_Page_Setup_Record; |
Margin | : Gdouble; | |
Unit | : Gtk.Enums.Gtk_Unit); |
function Get_Left_Margin
( | Self | : not null access Gtk_Page_Setup_Record; |
Unit | : Gtk.Enums.Gtk_Unit) return Gdouble; |
procedure Set_Left_Margin
( | Self | : not null access Gtk_Page_Setup_Record; |
Margin | : Gdouble; | |
Unit | : Gtk.Enums.Gtk_Unit); |
function Get_Orientation
( | Self | : not null access Gtk_Page_Setup_Record) return Gtk.Enums.Gtk_Page_Orientation; |
procedure Set_Orientation
( | Self | : not null access Gtk_Page_Setup_Record; |
Orientation | : Gtk.Enums.Gtk_Page_Orientation); |
function Get_Page_Height
( | Self | : not null access Gtk_Page_Setup_Record; |
Unit | : Gtk.Enums.Gtk_Unit) return Gdouble; |
function Get_Page_Width
( | Self | : not null access Gtk_Page_Setup_Record; |
Unit | : Gtk.Enums.Gtk_Unit) return Gdouble; |
function Get_Paper_Height
( | Self | : not null access Gtk_Page_Setup_Record; |
Unit | : Gtk.Enums.Gtk_Unit) return Gdouble; |
function Get_Paper_Size
( | Self | : not null access Gtk_Page_Setup_Record) return Gtk.Paper_Size.Gtk_Paper_Size; |
procedure Set_Paper_Size
( | Self | : not null access Gtk_Page_Setup_Record; |
Size | : Gtk.Paper_Size.Gtk_Paper_Size); |
function Get_Paper_Width
( | Self | : not null access Gtk_Page_Setup_Record; |
Unit | : Gtk.Enums.Gtk_Unit) return Gdouble; |
function Get_Right_Margin
( | Self | : not null access Gtk_Page_Setup_Record; |
Unit | : Gtk.Enums.Gtk_Unit) return Gdouble; |
procedure Set_Right_Margin
( | Self | : not null access Gtk_Page_Setup_Record; |
Margin | : Gdouble; | |
Unit | : Gtk.Enums.Gtk_Unit); |
function Get_Top_Margin
( | Self | : not null access Gtk_Page_Setup_Record; |
Unit | : Gtk.Enums.Gtk_Unit) return Gdouble; |
procedure Set_Top_Margin
( | Self | : not null access Gtk_Page_Setup_Record; |
Margin | : Gdouble; | |
Unit | : Gtk.Enums.Gtk_Unit); |
function Load_File
( | Self | : not null access Gtk_Page_Setup_Record; |
File_Name | : UTF8_String) return Boolean; |
function Load_Key_File
( | Self | : not null access Gtk_Page_Setup_Record; |
Key_File | : Glib.Key_File.G_Key_File; | |
Group_Name | : UTF8_String := "") return Boolean; |
procedure Set_Paper_Size_And_Default_Margins
( | Self | : not null access Gtk_Page_Setup_Record; |
Size | : Gtk.Paper_Size.Gtk_Paper_Size); |
function To_File
( | Self | : not null access Gtk_Page_Setup_Record; |
File_Name | : UTF8_String) return Boolean; |
procedure To_Key_File
( | Self | : not null access Gtk_Page_Setup_Record; |
Key_File | : Glib.Key_File.G_Key_File; | |
Group_Name | : UTF8_String); |
A GtkPageSetup object stores the page size, orientation and margins. The idea is that you can get one of these from the page setup dialog and then pass it to the Gtk.Print_Operation.Gtk_Print_Operation when printing. The benefit of splitting this out of the Gtk.Print_Settings.Gtk_Print_Settings is that these affect the actual layout of the page, and thus need to be set long before user prints. <para id="print-margins"> The margins specified in this object are the "print margins", i.e. the parts of the page that the printer cannot print on. These are different from the layout margins that a word processor uses; they are typically used to determine the *minimal* size for the layout margins.
To obtain a Gtk.Page_Setup.Gtk_Page_Setup use Gtk.Page_Setup.Gtk_New to get the defaults, or use gtk_print_run_page_setup_dialog to show the page setup dialog and receive the resulting page setup. == A page setup dialog == static GtkPrintSettings *settings = NULL; static GtkPageSetup *page_setup = NULL; static void do_page_setup (void) { GtkPageSetup *new_page_setup; if (settings == NULL) settings = gtk_print_settings_new (<!-- -->); new_page_setup = gtk_print_run_page_setup_dialog (GTK_WINDOW (main_window), page_setup, settings); if (page_setup) g_object_unref (page_setup); page_setup = new_page_setup; } Printing support was added in GTK+ 2.10.