----- Sample application window -----
with Claw.Frame_Window;
with Claw; use Claw;
with Claw.Canvas;
with Claw.Menus.Bar;
with Claw.Menus.Popup;
with Shape_Select;
with Shape_Command;
with Claw.Dialog.Color;
package Shape_App is
Command_Dialog_Object : Shape_Command.Shape_Command_Type; -- Modeless dialog box test.
type Shape_App_Window_Type is new Claw.Frame_Window.Frame_Window_Type with private;
-- User routine:
procedure Run_Application (Window : in out Shape_App_Window_Type);
-- Run the application window.
private
-- Overridings not needed by users of app.
procedure When_Command (Window : in out Shape_App_Window_Type;
From : in Claw.Command_Source_Type;
Command_Id : in Claw.Menu_Identifier_Type;
Unknown_Command : in out Boolean);
-- Called when a menu command is executed.
procedure When_Draw (Window : in out Shape_App_Window_Type;
Easel : in out Claw.Canvas.Basic_Canvas_Type'Class;
Erase_Background : in Boolean;
Area : in Rectangle_Type);
-- This procedure is called whenever a section of the current
-- window needs to be (re)drawn. Easel is an open canvas object
-- for the appropriate window area. Erase_Background is true if the
-- background needs to be erased. Area is the area to redraw.
procedure When_Popup_Menu (Window : in out Shape_App_Window_Type;
Position : in Claw.Point_Type;
Do_Default : in out Boolean);
-- This procedure is called whenever a popup menu should be displayed
-- for Window. This happens if the user right mouse clicks, or
-- if they type the special menu popup key on Microsoft keyboards.
procedure Destroy (Window : in out Shape_App_Window_Type);
-- Destroy Window and all child windows.
-- Finalization will call Destroy_Window on any open windows.
-- Raises:
-- Not_Valid_Error if Window does not have an open (Windows) window.
-- Windows_Error if Windows returns an error.
type Shape_App_Window_Type is new Claw.Frame_Window.Frame_Window_Type with record
Shape : Shape_Select.Shape_Type := Shape_Select.Ellipses;
Menu_Bar : Claw.Menus.Bar.Menu_Bar_Type;
Popup_Menu : Claw.Menus.Popup.Popup_Menu_Type;
Color : Claw.Colors.Color_Type := Claw.Colors.RGB (Red => 255, Green => 0, Blue => 0);
Custom_Colors : Claw.Dialog.Color.Custom_Color_Array_Type := (others => Claw.Colors.BLACK);
end record;
end Shape_App;