Hosted by
 |
with Real_Numbers; use Real_Numbers;
with Real_Vectors; use Real_Vectors;
with Glyph_Images; use Glyph_Images;
with Font_Loaders; use Font_Loaders;
with Printers; use Printers;
package Boxes is
Quiet : constant Boolean := True;
type Box is abstract tagged limited private;
type Box_Access is access all Box'Class;
procedure Set_Center
(This : access Box;
Center : in Vector := (0.0, 0.0));
function Get_Center
(This : access Box)
return Vector;
function Get_Bounds
(This : access Box)
return Rectangle;
function Get_Minimum_Width
(This : access Box)
return Real;
function Get_Optimum_Width
(This : access Box)
return Real;
procedure Layout
(This : access Box;
Font : access Font_Loader)
is abstract;
procedure Print
(This : access Box;
To : access Printer'Class;
Center : in Vector)
is abstract;
procedure Print_Bounds
(This : access Box;
To : access Printer'Class;
Center : in Vector);
procedure Add_Width
(This : access Box;
Inner : access Box'Class);
procedure Max_Bounds
(This : access Box;
Inner : access Box'Class);
procedure Estimate_Width
(This : access Box);
function Get_Left
(This : access Box)
return Real;
function Get_Top
(This : access Box)
return Real;
function Get_Right
(This : access Box)
return Real;
function Get_Bottom
(This : access Box)
return Real;
private
type Box is abstract tagged limited record
Center : Vector := (0.0, 0.0);
Bounds : Rectangle := (others => 0.0);
Minimum_Width : Real := 0.0;
Optimum_Width : Real := 0.0;
end record;
end Boxes;
|