summaryrefslogtreecommitdiff
path: root/src/fltk-devices-surfaces-paged-printers.ads
blob: b3363731d41ad75598c497206fcf4003299da047 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141


with

    FLTK.Widgets.Groups.Windows;


package FLTK.Devices.Surfaces.Paged.Printers is


    type Printer is new Paged_Surface with private;

    type Printer_Reference (Data : not null access Printer'Class) is limited null record
        with Implicit_Dereference => Data;




    package Forge is

        function Create
            return Printer;

    end Forge;




    procedure Start_Job
           (This  : in out Printer;
            Count : in     Natural);

    procedure Start_Job
           (This     : in out Printer;
            Count    : in     Natural;
            From, To : in     Positive);

    procedure End_Job
           (This : in out Printer);

    procedure Start_Page
           (This : in out Printer);

    procedure End_Page
           (This : in out Printer);




    procedure Get_Margins
           (This                     : in     Printer;
            Left, Top, Right, Bottom :    out Integer);

    procedure Get_Printable_Rect
           (This : in     Printer;
            W, H :    out Integer);

    procedure Get_Origin
           (This : in     Printer;
            X, Y :    out Integer);

    procedure Set_Origin
           (This : in out Printer;
            X, Y : in     Integer);

    procedure Rotate
           (This    : in out Printer;
            Degrees : in     Float);

    procedure Scale
           (This   : in out Printer;
            Factor : in     Float);

    procedure Scale
           (This               : in out Printer;
            Factor_X, Factor_Y : in     Float);

    procedure Translate
           (This             : in out Printer;
            Delta_X, Delta_Y : in     Integer);

    procedure Untranslate
           (This : in out Printer);




    procedure Print_Widget
           (This               : in out Printer;
            Item               : in     FLTK.Widgets.Widget'Class;
            Offset_X, Offset_Y : in     Integer := 0);

    procedure Print_Window_Part
           (This               : in out Printer;
            Item               : in     FLTK.Widgets.Groups.Windows.Window'Class;
            X, Y, W, H         : in     Integer;
            Offset_X, Offset_Y : in     Integer := 0);




    procedure Set_Current
           (This : in out Printer);


private


    type Printer is new Paged_Surface with null record;

    overriding procedure Finalize
           (This : in out Printer);




    pragma Inline (Start_Job);
    pragma Inline (End_Job);
    pragma Inline (Start_Page);
    pragma Inline (End_Page);


    pragma Inline (Get_Margins);
    pragma Inline (Get_Printable_Rect);
    pragma Inline (Get_Origin);
    pragma Inline (Set_Origin);
    pragma Inline (Rotate);
    pragma Inline (Scale);
    pragma Inline (Translate);
    pragma Inline (Untranslate);


    pragma Inline (Print_Widget);
    pragma Inline (Print_Window_Part);


    pragma Inline (Set_Current);


end FLTK.Devices.Surfaces.Paged.Printers;