Package Name: window.document
-- =============================================================================
-- File : window-document.ads =
-- Project : AMAF =
-- Version : 1.0.0 =
-- Author : M. A. van der Lugt =
-- =
-- Copyright 1996 Marinus A. van der Lugt =
-- =
-- History : =
-- ----------------------------------------------------------------------------=
-- =============================================================================
-- This window is intented to be used to view documents, its properties are
-- + Moveable
-- + Go Away box
-- + Zoom box
-- + Size box
-- This type of window mostly has a document file associated with it. It may
-- have some controls, and often uses scrollbars. The name of its document
-- file should be reflected in the window title.
-- =============================================================================
package Window.Document is
-- =============================================================================
type Document_Window is new Window with private ;
-- Controlling operations
procedure Initialize
(This : in out Document_Window) ;
procedure Handle_Command
(This : in out Document_Window ;
aCommand : in COM.Command'class ;
Command_Was_Handled : out boolean) ;
-- Command handler operations
procedure Do_Zoom_In (This : in out Document_Window) ;
procedure Do_Zoom_Out (This : in out Document_Window) ;
procedure Do_Grow_Window
(This : in out Document_Window ;
aCommand : in COM.Grow_Window_Command) ;
procedure Do_Resize_Window
(This : in out Document_Window ;
aCommand : in COM.Resize_Window_Command) ;
-- Auxillary operations
procedure Draw (This : in out Document_Window) ;
private
type Document_Window is new Window with
record
Has_Sizebox : boolean := true ;
Has_Vertical_Scrollbar : boolean := false ;
Has_Horizontal_Scrollbar : boolean := false ;
Min_Max_Window_Size : Types.Rect := (0, 0, 0, 0) ;
Erase_On_Resize_Or_Zoom : boolean := true ;
end record ;
end Window.Document ;