with Claw,
Claw.Brushes,
Claw.Fonts,
Claw.Pens;
package Claw.Canvas is
--
-- CLAW - Class Library for Ada and Windows.
--
-- This package contains basic canvas objects and operations.
--
-- Copyright 1996, 1997 R.R. Software, Inc.
-- P.O. Box 1512, Madison WI 53701
-- All rights reserved.
--
-- Simplified for demo.
type Basic_Canvas_Type is new Root_Canvas_Type with private;
-- Implementation note: Destroying a Basic_Canvas_Type does not
-- ReleaseDC or EndPaint the contained DC.
-- Inherits Is_Valid and Get_Handle.
procedure Destroy (Easel : in out Basic_Canvas_Type);
-- Destroy the given Canvas.
-- Raises:
-- Not_Valid_Error if Easel is not an open canvas.
-- Windows_Error if Windows detects an error.
procedure Choose (Easel : in out Basic_Canvas_Type;
Brush : in out Claw.Brushes.Brush_Type'Class);
-- Select the Brush into the Easel canvas.
-- Raises:
-- Not_Valid_Error if Easel is not an open canvas.
-- Not_Found_Error if Brush is not a valid brush.
procedure Choose (Easel : in out Basic_Canvas_Type;
Font : in out Claw.Fonts.Font_Type'Class);
-- Select the Font into the Easel canvas.
-- Raises:
-- Not_Valid_Error if Easel is not an open canvas.
-- Not_Found_Error if Font is not a valid font.
procedure Choose (Easel : in out Basic_Canvas_Type;
Pen : in out Claw.Pens.Pen_Type'Class);
-- Select the Pen into the Easel canvas.
-- Raises:
-- Not_Valid_Error if Easel is not an open canvas.
-- Not_Found_Error if Pen is not a valid pen.
private
type Basic_Canvas_Type is new Root_Canvas_Type with null record;
procedure General_Choose (Easel : in out Basic_Canvas_Type;
Kind : in Tool_Kinds;
Tool : in out Root_Tool_Type'Class);
-- Select some sort of tool into Easel.
-- Raises:
-- Not_Valid_Error if Easel is not an open canvas.
-- Not_Found_Error if Tool is not a valid tool.
procedure Initialize (Easel : in out Basic_Canvas_Type);
-- Initialize Canvas (for Controlled types; this routine need not
-- be called explicitly).
procedure Finalize (Easel : in out Basic_Canvas_Type);
-- Finalize Canvas (for Controlled types; this routine need not
-- be called explicitly).
end Claw.Canvas;